mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-21 23:09:51 +01:00
15 lines
427 B
JavaScript
15 lines
427 B
JavaScript
|
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);
|
||
|
});
|
||
|
}
|