diff options
author | Peter 'Pita' Martischka <petermartischka@googlemail.com> | 2012-10-02 00:35:43 +0100 |
---|---|---|
committer | Peter 'Pita' Martischka <petermartischka@googlemail.com> | 2012-10-02 00:35:43 +0100 |
commit | ba4ebbba3ba662f18c3f839426fc0152eaf898a7 (patch) | |
tree | abb858c33fd38f330ef0237a66860f4c8d828041 /src/node/hooks/express | |
parent | 3578e36616f8882827eb4de160e703fd74becec7 (diff) | |
download | etherpad-lite-ba4ebbba3ba662f18c3f839426fc0152eaf898a7.zip |
Setted up an enviroment for frontend tests, first steps
Diffstat (limited to 'src/node/hooks/express')
-rw-r--r-- | src/node/hooks/express/tests.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/node/hooks/express/tests.js b/src/node/hooks/express/tests.js new file mode 100644 index 00000000..a0a2045e --- /dev/null +++ b/src/node/hooks/express/tests.js @@ -0,0 +1,15 @@ +var path = require("path"); + +exports.expressCreateServer = function (hook_name, args, cb) { + args.app.get('/tests/frontend/*', function (req, res) { + var subPath = req.url.substr("/tests/frontend".length); + if (subPath == ""){ + subPath = "index.html" + } + + var filePath = path.normalize(__dirname + "/../../../../tests/frontend/") + filePath += subPath.replace("..", ""); + + res.sendfile(filePath); + }); +}
\ No newline at end of file |