2019-01-22 08:55:35 +00:00
|
|
|
const database = require('./lib/database');
|
|
|
|
const smtp = require('./lib/smtp');
|
|
|
|
|
|
|
|
module.exports = app => {
|
|
|
|
global.appPath = __dirname;
|
|
|
|
|
|
|
|
process.env.OPENSSL_CONF = '/etc/ssl/';
|
|
|
|
|
|
|
|
// Init database instance
|
|
|
|
database.init();
|
|
|
|
// Init SMTP Instance
|
|
|
|
smtp.init();
|
|
|
|
|
|
|
|
require('./lib/router')(app);
|
2019-01-22 13:10:34 +00:00
|
|
|
// require('./lib/errorHandler')(app);
|
2019-01-22 08:55:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|