UNPKG

@ckenx/kenx-fastify

Version:

Kenx fastify framework plugin

13 lines (12 loc) 571 B
import type { HTTPServer, ServerPlugin, ApplicationPlugin, ActiveServerInfo } from '@ckenx/node'; import type { ServerConfig } from './types'; import type { FastifyInstance } from 'fastify'; export default class Server implements ServerPlugin<HTTPServer> { readonly app: ApplicationPlugin<FastifyInstance>; readonly server: HTTPServer; private readonly config; constructor(app: ApplicationPlugin<FastifyInstance>, config: ServerConfig); listen(): Promise<ActiveServerInfo | null>; close(): Promise<this>; getInfo(): ActiveServerInfo | null; }