|
|
|
|
|
|
59
|
app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded
|
59
|
app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded
|
|
60
|
app.use('/', route_manager);
|
60
|
app.use('/', route_manager);
|
|
61
|
app.use('/source', require('magic-window')('/source', { ignore: ['config', 'redis', 'cert.pem', 'key.pem', 'dump.rdb', 'logpasswd'] }))
|
61
|
app.use('/source', require('magic-window')('/source', { ignore: ['config', 'redis', 'cert.pem', 'key.pem', 'dump.rdb', 'logpasswd'] }))
|
|
62
|
-app.use('/log', auth, express.static('log'));
|
|
|
|
63
|
-app.use('/log', auth, serveIndex('log', {'icons': true}));
|
|
|
|
|
|
62
|
+if (production === "-p") {
|
|
|
|
63
|
+ app.use('/log', auth, express.static('log'));
|
|
|
|
64
|
+ app.use('/log', auth, serveIndex('log', {'icons': true}));
|
|
|
|
65
|
+}
|
|
64
|
|
66
|
|
|
65
|
app.listen(3000, function () {
|
67
|
app.listen(3000, function () {
|
|
66
|
console.log('Now accepting connections on port 3000.');
|
68
|
console.log('Now accepting connections on port 3000.');
|