Implemented interface loading in the server index.js

This commit is contained in:
Mathias Wagner
2024-05-21 14:32:01 +02:00
parent e18961eb6c
commit bf994b763b
+3 -1
View File
@@ -43,6 +43,8 @@ const run = async () => {
await require('./controller/integrations').initialize();
await require('./util/loadInterfaces').requestInterfaces();
if (process.env.PREVIEW_MODE !== "true") await require('./util/loadCli').load();
await config.insertDefaults();
@@ -60,7 +62,7 @@ const run = async () => {
db.authenticate().then(() => {
console.log("Successfully connected to the database " + (process.env.DB_TYPE === "mysql" ? "server" : "file"));
run().then(undefined);
run().then(undefined);
}).catch(err => {
console.error("Could not open the database file. Maybe it is damaged?: " + err.message);
process.exit(111);