diff --git a/node/server.js b/node/server.js index 2f0b47ff1..f07bdd5d6 100644 --- a/node/server.js +++ b/node/server.js @@ -254,20 +254,6 @@ async.waterfall([ }); }); - //serve pad.html under /p - app.get('/p/:pad', function(req, res, next) - { - var filePath = path.normalize(__dirname + "/../static/pad.html"); - res.sendfile(filePath, { maxAge: exports.maxAge }); - }); - - //serve timeslider.html under /p/$padname/timeslider - app.get('/p/:pad/timeslider', function(req, res, next) - { - var filePath = path.normalize(__dirname + "/../static/timeslider.html"); - res.sendfile(filePath, { maxAge: exports.maxAge }); - }); - //serve timeslider.html under /p/$padname/timeslider app.get('/p/:pad/:rev?/export/:type', function(req, res, next) { diff --git a/node/specialpages.js b/node/specialpages.js index a920d6f1a..9a4bcb333 100644 --- a/node/specialpages.js +++ b/node/specialpages.js @@ -30,4 +30,19 @@ exports.expressServer = function (hook_name, args, cb) { } }); }); + + //serve pad.html under /p + args.app.get('/p/:pad', function(req, res, next) + { + var filePath = path.normalize(__dirname + "/../static/pad.html"); + res.sendfile(filePath, { maxAge: exports.maxAge }); + }); + + //serve timeslider.html under /p/$padname/timeslider + args.app.get('/p/:pad/timeslider', function(req, res, next) + { + var filePath = path.normalize(__dirname + "/../static/timeslider.html"); + res.sendfile(filePath, { maxAge: exports.maxAge }); + }); + } \ No newline at end of file