summary refs log tree commit diff
path: root/dist/Server.d.ts
diff options
context:
space:
mode:
authorxnacly <matteogropp@gmail.com>2020-12-31 13:58:18 +0100
committerxnacly <matteogropp@gmail.com>2020-12-31 13:58:18 +0100
commit7b8b8b649e6f3879dd59d1c26ea65cad160b6d1b (patch)
treec74ef420cf3fbf4605a3ff3815b65f347e22d74c /dist/Server.d.ts
parentfinished cdn (POST, GET, DELETE) (diff)
downloadserver-7b8b8b649e6f3879dd59d1c26ea65cad160b6d1b.tar.xz
dist dir
Diffstat (limited to 'dist/Server.d.ts')
-rw-r--r--dist/Server.d.ts29
1 files changed, 29 insertions, 0 deletions
diff --git a/dist/Server.d.ts b/dist/Server.d.ts
new file mode 100644

index 00000000..f4d12c65 --- /dev/null +++ b/dist/Server.d.ts
@@ -0,0 +1,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>; +}