summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-05-10 18:04:02 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-05-10 18:04:02 +0200
commitfdaa277935aa2807218c369cbb323db7f27fd8a2 (patch)
treec03df88c64301daed1dee227ad508830becbe268 /src
parentadd dom to libs (compiler flag) (diff)
downloadserver-fdaa277935aa2807218c369cbb323db7f27fd8a2.tar.xz
:bug: fix CDN
Diffstat (limited to 'src')
-rw-r--r--src/Server.ts2
-rw-r--r--src/index.ts11
2 files changed, 4 insertions, 9 deletions
diff --git a/src/Server.ts b/src/Server.ts

index 5e96c602..3e8c9321 100644 --- a/src/Server.ts +++ b/src/Server.ts
@@ -22,7 +22,7 @@ export class CDNServer extends Server { db: Database; public options: CDNServerOptions; - constructor(options: CDNServerOptions) { + constructor(options: Partial<CDNServerOptions>) { super(options); this.db = new MongoDatabase(options?.db); diff --git a/src/index.ts b/src/index.ts
index d8025968..64fca7e5 100644 --- a/src/index.ts +++ b/src/index.ts
@@ -1,14 +1,9 @@ -import { Server } from "./Server"; +import { CDNServer } from "./Server"; -const server = new Server(); +const server = new CDNServer({ db: "" }); server - .init() + .start() .then(() => { console.log("[Server] started on :" + server.options.port); }) .catch((e) => console.error("[Server] Error starting: ", e)); - -//// server -//// .destroy() -//// .then(() => console.log("[Server] closed.")) -//// .catch((e) => console.log("[Server] Error closing: ", e));