Module serverino.config

Configuration module for serverino.

Structs

NameDescription
priority UDA. Set @endpoint priority
route UDA. You can use to filter requests using a function bool(Request request) { }
ServerinoConfig Struct used to setup serverino. You must return this struct from a function with @onServerInit UDA attached.

Enums

NameDescription
endpoint UDA. Functions with @endpoint attached are called when a request is received
onDaemonStart UDA. Called when daemon start. Running in main thread, not in worker.
onDaemonStop UDA. Called when daemon exit. Running in main thread, not in worker.
onServerInit UDA. Used to setup serverino. Must return a ServerinoConfig struct. See ServerinoConfig struct.
onWebSocketStart UDA. Functions with @onWebSocketStart attached are called when a websocket is started
onWebSocketStop UDA. Functions with @onWebSocketStop attached are called when a websocket is stopped
onWebSocketUpgrade UDA. Functions with @onWebSocketUpgrade attached are called when a websocket upgrade is requested
onWorkerStart UDA. Functions with @onWorkerStart attached are called when worker is started
onWorkerStop UDA. Functions with @onWorkerStop attached are called when worker is stopped

Aliases

NameTypeDescription
route route!((r)=>compareUri!uri(r)) UDA. You can use to filter requests using a uri.