summaryrefslogtreecommitdiff
path: root/src/node
diff options
context:
space:
mode:
authorEgil Moeller <egil.moller@freecode.no>2012-03-13 18:24:45 +0100
committerEgil Moeller <egil.moller@freecode.no>2012-03-13 18:24:45 +0100
commit05c2e0fde521b17a8229ac4d2f0478c71bef17d4 (patch)
treea69bec9c7d246ab8c762e23f4d7705b4c40af421 /src/node
parent5f7f382a9e1aee02a0848fd578384ad0d89ba37a (diff)
downloadetherpad-lite-05c2e0fde521b17a8229ac4d2f0478c71bef17d4.zip
Made all html pages into eejs templates
Diffstat (limited to 'src/node')
-rw-r--r--src/node/eejs/index.js (renamed from src/node/eejs/eejs.js)0
-rw-r--r--src/node/hooks/express/specialpages.js10
2 files changed, 4 insertions, 6 deletions
diff --git a/src/node/eejs/eejs.js b/src/node/eejs/index.js
index 9291a341..9291a341 100644
--- a/src/node/eejs/eejs.js
+++ b/src/node/eejs/index.js
diff --git a/src/node/hooks/express/specialpages.js b/src/node/hooks/express/specialpages.js
index 13cfd821..585a7eab 100644
--- a/src/node/hooks/express/specialpages.js
+++ b/src/node/hooks/express/specialpages.js
@@ -1,12 +1,12 @@
var path = require('path');
+var eejs = require('ep_etherpad-lite/node/eejs');
exports.expressCreateServer = function (hook_name, args, cb) {
//serve index.html under /
args.app.get('/', function(req, res)
{
- var filePath = path.normalize(__dirname + "/../../../static/index.html");
- res.sendfile(filePath, { maxAge: exports.maxAge });
+ res.send(eejs.require("ep_etherpad-lite/templates/index.html"), { maxAge: exports.maxAge });
});
//serve robots.txt
@@ -34,15 +34,13 @@ exports.expressCreateServer = 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 });
+ res.send(eejs.require("ep_etherpad-lite/templates/pad.html"), { 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 });
+ res.send(eejs.require("ep_etherpad-lite/templates/timeslider.html"), { maxAge: exports.maxAge });
});
} \ No newline at end of file