Interface RunnableApplication

Anything that listens on a port and returns an http.Server can be considered a "RunnableApplication." This matches the API of most common Node.js server frameworks, such as Express and Koa.

If your framework does not support this API explicitly, a simple wrapper should be easy enough to write to satisfy this interface.

interface RunnableApplication {
    listen: ((port, ...args) => Server<typeof IncomingMessage, typeof ServerResponse>);
}

Properties

Properties

listen: ((port, ...args) => Server<typeof IncomingMessage, typeof ServerResponse>)

Type declaration

    • (port, ...args): Server<typeof IncomingMessage, typeof ServerResponse>
    • Parameters

      • port: number
      • Rest ...args: any[]

      Returns Server<typeof IncomingMessage, typeof ServerResponse>

Generated using TypeDoc