/** * RESPLite entry point. Start TCP server with SQLite backend. * * Can be run as CLI (node src/index.ts) or used programmatically: * import { startServer } from 'resplite'; * startServer({ port: 6380, gracefulShutdown: false }); */ import type { CacheOptions } from './cache/cache.ts'; import type { SearchOptions } from './storage/sqlite/search.ts'; import type { CommandPolicy } from './commands/registry.ts'; import type { ScriptingPlugin } from './scripting/plugin.ts'; /** Options of {@link startServer}. */ export interface StartServerOptions { port?: number; dbPath?: string; pragmaTemplate?: string; /** Override specific pragmas when needed (e.g. { synchronous: 'FULL' }). Convention: template is applied by default. */ pragma?: Record; /** Hot data cache configuration, or false to disable it. */ cache?: false | CacheOptions; /** FT.SEARCH guards: minPrefix, maxResults, timeoutMs. */ search?: SearchOptions; /** If true, register SIGTERM/SIGINT to close server and DB. Set false if you handle shutdown yourself. Default true. */ gracefulShutdown?: boolean; /** Optional: rename/disable commands for hardening. */ commandPolicy?: CommandPolicy | null; /** Prepared plugin from resplite/scripting. */ scripting?: ScriptingPlugin | null; } export declare function startServer(options?: StartServerOptions): void;