Catch all route EXCEPT for /login

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("https://stackoverflow.com/", function(req, res) {
  ...
});

app.get('*', function(req, res) {
  ...
});

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)