UNPKG

radius-read

Version:

Realtime Dashboard

123 lines (122 loc) 3.33 kB
import { Router } from "express"; import { AppConfig } from "./../models/application.model"; import { ApiRouter } from "./../models/api.model"; import { WebAppService } from "./webapp.service"; import { WebAppConfig } from "./../models/webapp.model"; /** * ExpressService is a service class that initializes and manages an Express application. */ export declare class ExpressService { private logger?; /** * Application configuration for the Express service. * @date Jun 26, 2025 01:20:10 PM * @author Biswaranjan Nayak * * @private * @type {!AppConfig} */ private appConfig; /** * Web application configurations for the Express service. * @date Jun 26, 2025 01:20:20 PM * @author Biswaranjan Nayak * * @private * @type {!WebAppConfig[]} */ private _webAppConfigs; /** * Web application services for the Express service. * @date Jun 26, 2025 01:20:41 PM * @author Biswaranjan Nayak * * @private * @type {!WebAppService[]} */ webAppServices: WebAppService[]; /** * Express application instance for the Express service. * @date Jul 02, 2025 02:17:30 PM * @author Biswaranjan Nayak * * @private * @type {!express.Application} */ app: any; /** * Router instance for the Express service. * @date Jul 02, 2025 02:17:00 PM * @author Biswaranjan Nayak * * @private * @type {!Router} */ private _router; /** * Creates an instance of ExpressService. * @param appConfig * @param webAppConfigs */ constructor(appConfig: AppConfig, logger?: any | undefined); /** * Initializes the Express application with the provided API routers and starts the server. * @param apiRouters * @returns */ init(): void; /** * Initializes the Express application with the provided API routers and starts the server. * @param apiRouters */ initApiRouters(apiRouters: ApiRouter[]): void; /** * Initializes web application services with the provided web application configurations. * @param webAppConfigs */ intiWebAppServices(webAppConfigs: WebAppConfig[]): void; /** * Initializes the middleware for the Express application. * @returns */ initMiddleware(): any; /** * Serves log files from the specified directory. * @param app */ serveLogFiles(): void; /** * Initializes the router for the Express application. * @param app * @param router */ initRouter(): void; /** * Gets the SSL certificate for the application. * @returns */ getCertificate(): any; /** * Starts the Express application server with the provided application and certificate. * @param app * @param certificate * @returns */ start(): Promise<any>; /** * Starts the server and listens on the specified port. * @param server * @returns */ private startServer; /** * Initializes API routes with the provided ApiRouter instances. * @param apiRouters */ initAPIs(apiRouters: ApiRouter[]): void; /** * Gets a new Express router instance. * @returns */ getRouter(): Router; }