|
|
@@ -1,4 +1,5 @@
|
|
1
|
1
|
var express = require('express');
|
|
|
2
|
+var serveIndex = require('serve-index');
|
|
2
|
3
|
var https = require('https');
|
|
3
|
4
|
var app = express();
|
|
4
|
5
|
var route_manager = require("./utils/route-manager.js");
|
|
|
@@ -34,6 +35,8 @@ app.use(bodyParser.json()); // for parsing application/json
|
|
34
|
35
|
app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded
|
|
35
|
36
|
app.use('/', route_manager);
|
|
36
|
37
|
app.use('/source', require('magic-window')('/source', { ignore: ['config', 'redis', 'cert.pem', 'key.pem', 'dump.rdb'] }))
|
|
|
38
|
+app.use('/log', express.static('log'));
|
|
|
39
|
+app.use('/log', serveIndex('log', {'icons': true}));
|
|
37
|
40
|
|
|
38
|
41
|
app.listen(3000, function () {
|
|
39
|
42
|
console.log('Now accepting connections on port 3000.');
|