-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathserver.js
42 lines (40 loc) · 1.98 KB
/
server.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
console.log(' ');
console.log(` ,---------------------------,`);
console.log(` | /---------------------\\ |`);
console.log(` | | | |`);
console.log(` | | Arbor | |`);
console.log(` | | Back-end | |`);
console.log(` | | Server <3 | |`);
console.log(` | | | |`);
console.log(` | \\_____________________/ |`);
console.log(` |___________________________|`);
console.log(` ,---\\_____ [] _______/------,`);
console.log(` / /______________\ /|`);
console.log(` /___________________________________ / | ___`);
console.log(` | | | )`);
console.log(` | _ _ _ [-------] | | (`);
console.log(` | o o o [-------] | / _)_`);
console.log(` |__________________________________ |/ / /`);
console.log(` /-------------------------------------/| ( )/`);
console.log(` /-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/ /`);
console.log(`/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/ /`);
console.log(`~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`);
console.log(' ');
const bootstrap = require('./bootstrap');
const configModule = require('./modules/config');
const log4js = require('log4js');
const log = require('log4js').getLogger('server');
log.level = 'debug';
log4js.configure({
appenders: { cheese: { type: 'console' } },
categories: { default: { appenders: ['cheese'], level: 'trace' } }
});
(async () => {
const configFn = await configModule([{ modules_config: 'server_modules_config' }], { impl: 'modules-config' });
const predefinedModules = {};
const ctx = await bootstrap(configFn, predefinedModules);
log.info('Modules loaded:', JSON.stringify(Object.keys(ctx)));
log.info('Init rest...');
ctx.rest.init();
log.info('Done!');
})();