This commit is contained in:
2024-10-29 19:49:24 +02:00
commit 11eb888b9c
42 changed files with 7877 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
import 'dotenv/config';
console.debug = function(){
if (process.env.debug){
console.log.apply(console, arguments);
}
}
import App from './app/App.js';
const modules = [
{name:'Config', path:'app/Config.js'},
{name:'Db', path:'app/Db.js'},
{name:'WebServer', path:'app/WebServer.js'},
{name:'GameObjectsApi', path:'controllers/api/GameObjects.js'},
]
process.on('uncaughtException', err => {
console.error(err, 'Uncaught Exception thrown');
}).on('unhandledRejection', (reason, p) => {
console.error(reason, 'Unhandled Rejection at Promise', p);
});
const app = new App();
await app.importModules(modules);
await app.init();
console.log(`Starting...`);
app.start();