UNPKG

@roots/bud-server

Version:

Development server for @roots/bud

29 lines (24 loc) 689 B
import type {Connection} from '@roots/bud-framework/services/server' import type {RequestListener} from 'node:http' import {createServer, Server as HttpsServer} from 'node:https' import {BaseServer} from '@roots/bud-server/server/base' import {bind} from '@roots/bud-support/decorators/bind' /** * HTTPS Server */ export class Server extends BaseServer implements Connection { /** * Server instance */ public declare instance: HttpsServer /** * createServer */ @bind public async createServer( express: Express.Application & RequestListener, ): Promise<HttpsServer> { this.instance = createServer(this.options, express) return this.instance } }