initial
This commit is contained in:
@@ -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();
|
||||
Reference in New Issue
Block a user