ffffng/server/main.js

37 lines
828 B
JavaScript
Raw Normal View History

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');
require('./utils/resources');
2014-05-12 20:08:19 +02:00
require('./utils/strings');
require('./resources/nodeResource');
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');
require('./services/monitoringService');
2014-05-12 20:08:19 +02:00
require('../shared/validation/constraints');
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
});