1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-23 02:42:28 +01:00
This commit is contained in:
Flam3rboy 2021-08-29 16:58:56 +02:00
parent c3a1740c76
commit 2b858c3f0d

View File

@ -1,5 +1,5 @@
import { Server, ServerOptions } from "lambert-server";
import { Config, db } from "@fosscord/util";
import { Config, initDatabase } from "@fosscord/util";
import path from "path";
import avatarsRoute from "./routes/avatars";
@ -13,8 +13,7 @@ export class CDNServer extends Server {
}
async start() {
// @ts-ignore
await (db as Promise<Connection>);
await initDatabase();
await Config.init();
this.app.use((req, res, next) => {
res.set("Access-Control-Allow-Origin", "*");