How to redirect to post request in express

Viewed 10027

I'm creating a landing page that when hit, automatically triggers a Facebook authentication flow. However, I'm unable to automatically redirect from the index to the signup route. How do I redirect from a GET request to a POST request in express?

    router.get('/', function(req, res) {
        //redirect to login function
    });

    router.post('/signup', passport.authenticate('signup', {
      //Log user in on facebook
    }));
1 Answers
Related