🔊 fix log

This commit is contained in:
Flam3rboy 2021-07-18 19:49:10 +02:00
parent ba0e2bca03
commit 11ded12204
3 changed files with 63 additions and 10874 deletions

10905
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -53,7 +53,7 @@
"i18next-node-fs-backend": "^2.1.3", "i18next-node-fs-backend": "^2.1.3",
"image-size": "^1.0.0", "image-size": "^1.0.0",
"jsonwebtoken": "^8.5.1", "jsonwebtoken": "^8.5.1",
"lambert-server": "^1.2.7", "lambert-server": "^1.2.8",
"missing-native-js-functions": "^1.2.6", "missing-native-js-functions": "^1.2.6",
"mongoose": "^5.12.3", "mongoose": "^5.12.3",
"mongoose-autopopulate": "^0.12.3", "mongoose-autopopulate": "^0.12.3",

View File

@ -64,7 +64,7 @@ export class FosscordServer extends Server {
// @ts-ignore // @ts-ignore
await (db as Promise<Connection>); await (db as Promise<Connection>);
await this.setupSchema(); await this.setupSchema();
console.log("[DB] connected"); console.log("[Database] connected");
await Config.init(); await Config.init();
this.app.use(CORS); this.app.use(CORS);
@ -100,9 +100,9 @@ export class FosscordServer extends Server {
prefix.use("/channels/:id", RateLimit({ count: 5, window: 5 })); prefix.use("/channels/:id", RateLimit({ count: 5, window: 5 }));
this.routes = await this.registerRoutes(path.join(__dirname, "routes", "/")); this.routes = await this.registerRoutes(path.join(__dirname, "routes", "/"));
app.use("/api", prefix); // allow unversioned requests
app.use("/api/v8", prefix); app.use("/api/v8", prefix);
app.use("/api/v9", prefix); app.use("/api/v9", prefix);
app.use("/api", prefix); // allow unversioned requests
this.app = app; this.app = app;
this.app.use(ErrorHandler); this.app.use(ErrorHandler);
const indexHTML = fs.readFileSync(path.join(__dirname, "..", "client_test", "index.html"), { encoding: "utf8" }); const indexHTML = fs.readFileSync(path.join(__dirname, "..", "client_test", "index.html"), { encoding: "utf8" });