mirror of
https://github.com/spacebarchat/server.git
synced 2026-08-06 21:09:29 +00:00
Init plugin config
This commit is contained in:
+1
-2
@@ -26,7 +26,7 @@ import {
|
||||
WebAuthn,
|
||||
initDatabase,
|
||||
initEvent,
|
||||
registerRoutes,
|
||||
registerRoutes, PluginConfig,
|
||||
} from "@spacebar/util";
|
||||
import {
|
||||
Authentication,
|
||||
@@ -44,7 +44,6 @@ import morgan from "morgan";
|
||||
import path from "path";
|
||||
import { red } from "picocolors";
|
||||
import { initInstance } from "./util/handlers/Instance";
|
||||
import { PluginConfig } from "util/plugin/PluginConfig";
|
||||
|
||||
const PUBLIC_ASSETS_FOLDER = path.join(
|
||||
__dirname,
|
||||
|
||||
+2
-4
@@ -20,7 +20,7 @@ import { Server, ServerOptions } from "lambert-server";
|
||||
import {
|
||||
Attachment,
|
||||
Config,
|
||||
initDatabase,
|
||||
initDatabase, PluginConfig,
|
||||
registerRoutes,
|
||||
Sentry,
|
||||
} from "@spacebar/util";
|
||||
@@ -30,9 +30,7 @@ import avatarsRoute from "./routes/avatars";
|
||||
import guildProfilesRoute from "./routes/guild-profiles";
|
||||
import iconsRoute from "./routes/role-icons";
|
||||
import morgan from "morgan";
|
||||
import { Like, Or } from "typeorm";
|
||||
import bodyParser from "body-parser";
|
||||
import { PluginConfig } from "util/plugin/PluginConfig";
|
||||
import { Like } from "typeorm";
|
||||
|
||||
export type CDNServerOptions = ServerOptions;
|
||||
|
||||
|
||||
@@ -23,14 +23,13 @@ import {
|
||||
closeDatabase,
|
||||
Config,
|
||||
initDatabase,
|
||||
initEvent,
|
||||
initEvent, PluginConfig,
|
||||
Sentry,
|
||||
} from "@spacebar/util";
|
||||
import ws from "ws";
|
||||
import { Connection } from "./events/Connection";
|
||||
import http from "http";
|
||||
import { cleanupOnStartup } from "./util";
|
||||
import { PluginConfig } from "util/plugin/PluginConfig";
|
||||
|
||||
export class Server {
|
||||
public ws: ws.Server;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
import dotenv from "dotenv";
|
||||
dotenv.config();
|
||||
import { closeDatabase, Config, initDatabase, initEvent } from "@spacebar/util";
|
||||
import { closeDatabase, Config, initDatabase, initEvent, PluginConfig } from "@spacebar/util";
|
||||
import http from "http";
|
||||
import ws from "ws";
|
||||
import { Connection } from "./events/Connection";
|
||||
@@ -75,6 +75,7 @@ export class Server {
|
||||
async start(): Promise<void> {
|
||||
await initDatabase();
|
||||
await Config.init();
|
||||
await PluginConfig.init();
|
||||
await initEvent();
|
||||
|
||||
// try to load webrtc library, if failed just don't start webrtc endpoint
|
||||
|
||||
Reference in New Issue
Block a user