Rewriting routes
I have the following route in my app.js file
var local_app = function () {}, path = require('path')
local_app.prototype.init = function (app) {
app.get("/costumespage/popup/(|male|female)/\d/", function(req, res) {
res.sendFile(path.resolve(__dirname + '/../_generated/index.html'));
});
}
module.exports = new local_app()
When I try to access the url http://192.168.99.100:5000/costumespage/popup/female/1/#costumespage I'm being given the error below
Error: ENOENT: no such file or directory, stat '/usr/src/app/_generated/costumespage/popup/female/1/index.html'
Does Enduro have rewrite rules in place?
I note that at this line
You add the request url to the path. Is there anyway I can "override" this default for the specific URL?
I'm working on building a "rerouter". The is my first run at a cold-coded attempt (read: "does not work yet"), but it should be complete in the next month ofr so. https://github.com/tekwiz/Enduro/tree/feature/rerouter.