Function: runMain()
Documentation / @wtf/platform-node / runtime / runMain
function runMain<A, P>(program, options): Promise<number>;Defined in: packages/platform-node/src/runtime.ts:82
Runs program as runMain of @wtf/platform/runtime does, of the platform given, or of
Node’s (nodePlatform({ fetch, storage })) of the fetch and the storage given, interrupted
by SIGINT and SIGTERM, a second of which ends the process as Node does, and sets the
process’s exit code of how it ended (processExitCode).
await runMain(async ({ platform, signal }) => serve(platform, { signal }), { fetch, storage })Type Parameters
| Type Parameter | Default type |
|---|---|
A | - |
P | ProcessPlatform |
Parameters
| Parameter | Type |
|---|---|
program | Program<P, A> |
options | NodeRunMainOptions<P, A> |
Returns
Promise<number>
