2014-05-12 20:08:19 +02:00
|
|
|
/*jslint node: true */
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
// Dirty hack to allow usage of angular modules.
|
2016-05-16 13:33:49 +02:00
|
|
|
global.angular = require('ng-di');
|
2014-05-12 20:08:19 +02:00
|
|
|
|
|
|
|
angular.module('ffffng', []);
|
|
|
|
|
|
|
|
require('./config');
|
|
|
|
|
|
|
|
require('./app');
|
|
|
|
require('./router');
|
|
|
|
require('./libs');
|
|
|
|
|
|
|
|
require('./utils/errorTypes');
|
2016-05-18 22:50:06 +02:00
|
|
|
require('./utils/resources');
|
2014-05-12 20:08:19 +02:00
|
|
|
require('./utils/strings');
|
|
|
|
|
|
|
|
require('./resources/nodeResource');
|
2016-05-18 22:50:06 +02:00
|
|
|
require('./resources/monitoringResource');
|
2014-05-12 20:08:19 +02:00
|
|
|
|
2016-05-20 22:11:35 +02:00
|
|
|
require('./services/mailService');
|
2014-05-12 20:08:19 +02:00
|
|
|
require('./services/nodeService');
|
2016-05-18 22:50:06 +02:00
|
|
|
require('./services/monitoringService');
|
2014-05-12 20:08:19 +02:00
|
|
|
|
|
|
|
require('../shared/validation/constraints');
|
2014-06-06 18:24:40 +02:00
|
|
|
require('./validation/validator');
|
2014-05-12 20:08:19 +02:00
|
|
|
|
2016-05-20 22:11:35 +02:00
|
|
|
require('./db/database').init(function () {
|
|
|
|
angular.injector(['ffffng']).invoke(function (config, app, Router) {
|
|
|
|
Router.init();
|
2014-05-12 20:08:19 +02:00
|
|
|
|
2016-05-20 22:11:35 +02:00
|
|
|
app.listen(config.server.port, '::');
|
|
|
|
module.exports = app;
|
|
|
|
});
|
2014-05-12 20:08:19 +02:00
|
|
|
});
|