blob: f4d12c65bec826153a7b31f9af1908450c634db4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/// <reference types="node" />
import { Application, Router } from "express";
import { Database } from "lambert-db";
import { Server as HTTPServer } from "http";
import "express-async-errors";
export declare type ServerOptions = {
db: string;
port: number;
host: string;
};
declare global {
namespace Express {
interface Request {
server: Server;
}
}
}
export declare class Server {
app: Application;
http: HTTPServer;
db: Database;
routes: Router[];
options: ServerOptions;
constructor(options?: Partial<ServerOptions>);
init(): Promise<void>;
registerRoutes(root: string): Promise<any[]>;
registerRoute(root: string, file: string): any;
destroy(): Promise<void>;
}
|