main app file
This commit is contained in:
parent
4f13f64fc6
commit
898347e460
34
app.js
Normal file
34
app.js
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* This file is part of the authRXBN single sign-on package.
|
||||
*
|
||||
* (c) Ruben Meyer <contact@rxbn.de>
|
||||
*/
|
||||
|
||||
|
||||
// GDS: Global Data System
|
||||
global['gds'] = {
|
||||
debug: (process.env.NODE_ENV === 'debug') ? 1 : 0,
|
||||
db: null,
|
||||
cache: {},
|
||||
cfg: require(__dirname+'/bin/config')
|
||||
};
|
||||
global['modules'] = {};
|
||||
global['__dirname'] = __dirname;
|
||||
|
||||
/**
|
||||
* load modules
|
||||
*/
|
||||
let load = (name) => {
|
||||
return require(__dirname+'/bin/'+name+'/module');
|
||||
};
|
||||
|
||||
global['modules'].events = load('events'); // event handler
|
||||
global['modules'].cli = load('cli'); // command line interface
|
||||
global['modules'].logs = load('logs'); // log handler
|
||||
|
||||
global['modules'].database = load('database'); // database service
|
||||
global['modules'].web = load('web'); // web server
|
||||
global['modules'].auth = load('auth'); // authentication handler
|
||||
|
||||
// start web server
|
||||
global['modules'].web.start();
|
Loading…
x
Reference in New Issue
Block a user