Saturday, 6 May 2017

MEAN application link redirection

I've setup a system where a user can login to a website I created with a MEAN application. It's a two step setup. The user registers an account and is then emailed a link where it redirects them to a "http://localhost:3000/users/verify?email=". My problem is when the user clicks the link, it redirects them to here in the server file called app.js

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

As opposed to redirecting them to

router.post('/verify', function(req, res){

In the /users.js file.

I know it doesn't sound the clearest, but I can further explain my problem if that helps. Any help is appreciated!



via A. Angee

No comments:

Post a Comment