diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Server.ts | 2 | ||||
-rw-r--r-- | src/index.ts | 11 |
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)); |