1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-11 05:02:37 +01:00
This commit is contained in:
Flam3rboy 2021-08-29 16:58:56 +02:00
parent b68b1a1181
commit 0066ba223e

View File

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