summaryrefslogtreecommitdiffstats
path: root/index.js
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2016-01-20 19:05:02 +0200
committerJan Tuomi <jans.tuomi@gmail.com>2016-01-20 19:17:48 +0200
commit17b89099b36a63ed2854083cdb4cb06f47a41e14 (patch)
tree2db4ac8f2bafa8ff923b0080bbe400918ec7f6cd /index.js
parent09b2d3ba6bd282982b609ff84410e2bb0e2f9d49 (diff)
Refactor file structure
Diffstat (limited to 'index.js')
-rw-r--r--index.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/index.js b/index.js
index 055b1c7..15c269f 100644
--- a/index.js
+++ b/index.js
@@ -3,6 +3,7 @@ var http = require('http').Server(app);
var io = require('socket.io')(http);
var port = (process.env.PORT || 5000);
var LOGBROADCAST = true;
+
//get port from commandline parameteres
if (process.argv.length == 3) {
port = process.argv[2];
@@ -12,19 +13,18 @@ var que = [];
var pws = {};
app.get('/', function(req, res) {
- res.sendFile(__dirname + '/f/templates/index.html');
+ res.sendFile(__dirname + '/templates/index.html');
});
app.get('/adm', function(req, res) {
- res.sendFile(__dirname + '/f/templates/adm.html');
+ res.sendFile(__dirname + '/templates/adm.html');
});
app.get('/log', function(req, res) {
- res.sendFile(__dirname + '/f/templates/log.html');
+ res.sendFile(__dirname + '/templates/log.html');
});
-
//route all paths beginning with /f/ to real files
app.get('/f/*', function(req, res) {
- res.sendFile(__dirname + req.path);
+ res.sendFile(__dirname + req.path.substring(2));
});