V2 integration (#293)

* feat: integrations and lifecycles

* refactor: prevent issues with start order
This commit is contained in:
Carlos Valente
2023-02-23 20:22:38 +01:00
committed by GitHub
parent d8a84ac88d
commit 70cc071425
61 changed files with 1510 additions and 687 deletions
+3 -5
View File
@@ -1,16 +1,14 @@
// import { promise } from './modules/loadDb.js';
import { startOSCServer, startServer } from './app.js';
import { startDb, startIntegrations, startOSCServer, startServer } from './app.js';
async function startOntime() {
try {
// await promise;
await startDb();
// Start express server
const loaded = await startServer();
console.log(loaded);
// Start OSC Server (API)
await startOSCServer();
await startIntegrations();
} catch (error) {
console.log('Error starting Ontime');
console.log(error);