File size: 703 Bytes
077865a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Type surface of the esbuild-produced server bundle. At compile time TS
// resolves `./server.mjs` to this declaration; at runtime build/main.mjs
// resolves it to the sibling build/server.mjs (kept external in build:main).
import type { Server } from 'node:http';
import type Database from 'better-sqlite3';

export interface StartOptions {
  dbPath: string;
  clientDist: string;
  host: string;
  preferredPort: number;
}

export interface ServerHandle {
  server: Server;
  port: number;
}

export function startServer(opts: StartOptions): Promise<ServerHandle>;
export function ensureSessionToken(): string;
export function getDb(): Database.Database;
export function getUnifiedApiKey(): string;