import type { Server } from 'node:http'; import type { ProcessDestroySignal, Services } from './typings'; import express from 'express'; export default class App { services: Services; express: express.Express | null; server: Server | null; isAlive: boolean; constructor(services: Services); bind(): this; start(): Promise; stop(): Promise; restart(): Promise; signalHandler(signal: ProcessDestroySignal): () => Promise; errorHandler(signal: ProcessDestroySignal): (err: Error) => Promise; /** * Cleanup and stop the process properly, then exit the process. * @param signal - Signal to stop the process with * @param err - Error that caused the destruction of the process */ destroy(signal: ProcessDestroySignal, err?: Error): Promise; }