I'm not sure what you want to happen when a user accesses /login
or /
, but you can create separate routes for those; if you declare them before the catch-all, they get first dibs at handling the incoming requests:
app.get('/login', function(req, res) {
...
});
app.get('/', function(req, res) {
...
});
app.get('*', function(req, res) {
...
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…