问题
I want to route root route (http://server:5000/) in my node.js express.js application:
When I go to http://server:5000/ I get: Redirecting to //
I get the same message if I have a route:
app.get('/', routes.index);
What can be the problem?
回答1:
This was a bug in Windows with Connect: https://github.com/senchalabs/connect/issues/427
You should update or set the redirect option to false in the Connect static middleware.
来源:https://stackoverflow.com/questions/8648581/node-js-express-js-routing-of-root-redirecting-to