Allow running api, cdn, gateway separately

This commit is contained in:
Madeline
2022-10-31 13:16:29 +11:00
parent 152ed6da95
commit 9a7a43a725
5 changed files with 19 additions and 14 deletions
+3 -2
View File
@@ -1,7 +1,7 @@
import "missing-native-js-functions";
import { Server, ServerOptions } from "lambert-server";
import { Authentication, CORS } from "./middlewares/";
import { Config, initDatabase, initEvent } from "@fosscord/util";
import { BannedWords, Config, initDatabase, initEvent } from "@fosscord/util";
import { ErrorHandler } from "./middlewares/ErrorHandler";
import { BodyParser } from "./middlewares/BodyParser";
import { Router, Request, Response, NextFunction } from "express";
@@ -14,7 +14,7 @@ import { initInstance } from "./util/handlers/Instance";
import { registerRoutes } from "@fosscord/util";
import { red } from "picocolors";
export interface FosscordServerOptions extends ServerOptions {}
export interface FosscordServerOptions extends ServerOptions { }
declare global {
namespace Express {
@@ -38,6 +38,7 @@ export class FosscordServer extends Server {
await Config.init();
await initEvent();
await initInstance();
await BannedWords.init();
let logRequests = process.env["LOG_REQUESTS"] != undefined;
if (logRequests) {