I am creating a NodeJS web application via ExpressJS. I have the following two routes (among others):
app.get('/user/reset/verify', function(req, res) {
console.log("Executing verification index.");
res.render("verify/index");
});
app.get('/user/reset/verify/:email/:token', function(req, res) {
console.log("Executing verification change.");
res.render("verify/change");
});
When I go to the verification index page, I see "Executing verification index." printed once on the console. However, when I go to the verification change page, I see "Executing verification change." printed twice on the console.
I have noticed that this is a trend with the routes in my app. Routes that contain parameters are always executed twice, while routes without parameters are only (properly) executed once.
Why are the routes with parameters being executed twice?
The views that are being rendered only contain simple HTML - nothing that would cause another request to the page. Also, I am issuing these requests from a Chrome browser.
Platform/Versions:
- NodeJS: 0.5.5 windows build (running on Win 7)
- Express: 2.4.6
- Connect: 1.7.1