diff options
Diffstat (limited to 'src/node/hooks/express/tests.js')
-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 |