-
Notifications
You must be signed in to change notification settings - Fork 0
/
serv.js
41 lines (31 loc) · 941 Bytes
/
serv.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
41
var express = require('express'),
app = express(),
server = require('http').Server(app),
morgan = require('morgan');
/* view engine */
app.set('views', 'views/');
app.set('view engine', 'jade');
/* logger */
app.use(morgan('dev'));
/* static */
app.use(express.static(__dirname));
/* index */
app.use('/', require('./routes/index.router'));
console.log('index started');
/* apps */
app.use('/characteristics', require('./routes/06.characteristics.router'));
console.log('Characteristics started');
app.use('/senritu', require('./routes/07.senritu.router'));
console.log('Senritu started');
app.use('/heart', require('./routes/08.heart.router'));
console.log('Heart started');
app.use('/box', require('./routes/09.box.router')(server));
console.log('Box started');
/* 404 */
app.use(function (req, res) {
res.status(404);
res.render('404');
});
server.listen(880, function() {
console.log('Server started @ port 880');
});