start
start(
mainApiFile,opts?):Promise<void>
Defined in: server.ts:494
Starts the Lowlander WebSocket server.
Parameters
Section titled “Parameters”mainApiFile
Section titled “mainApiFile”string
Absolute path to the compiled API file exporting server functions
string
Address and port (default: ‘0.0.0.0:8080’)
threads?
Section titled “threads?”number
Worker thread count (default: auto)
injectWarpSocket?
Section titled “injectWarpSocket?”any
For testing: inject a custom WarpSocket implementation (e.g. FakeWarpSocket)
Returns
Section titled “Returns”Promise<void>
Example
Section titled “Example”import { start } from 'lowlander/server';import { fileURLToPath } from 'url';import { resolve, dirname } from 'path';
const API_FILE = resolve(dirname(fileURLToPath(import.meta.url)), 'api.js');start(API_FILE, { bind: '0.0.0.0:8080' });