-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
40 lines (29 loc) · 1.04 KB
/
app.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
/**
* This is an Express app instance, extended by express rapido
* @type ExpressRapido
*/
var app = require('./config/expressRapido.js')();
app.set('title', 'CDF');
app.set('appDbName', 'cdf');
//boot the app
app.boot();
//register some models
app.registerModel('User', 'user');
app.registerModel('Option', 'option');
app.registerModel('Cdf', 'cdf');
app.registerModel('Pages', 'pages');
//register some controllers
app.registerController('request');
app.registerController('security');
app.registerController('home');
app.registerController('api');
app.registerController('error404');
app.registerController('error');
//register some route
app.registerRouteConfig('', app.getController('request'));
app.registerRouteConfig('/security', app.getController('security').router);
app.registerRouteConfig('/', app.getController('home').router);
app.registerRouteConfig('/api', app.getController('api').router);
app.registerRouteConfig('', app.getController('error404').router);
app.registerRouteConfig('', app.getController('error'));
module.exports = app;