Skip to content

Instantly share code, notes, and snippets.

@Andrew-Spiers
Last active August 29, 2015 14:01
Show Gist options
  • Save Andrew-Spiers/70f3665ba74672c2a834 to your computer and use it in GitHub Desktop.
Save Andrew-Spiers/70f3665ba74672c2a834 to your computer and use it in GitHub Desktop.
node.js - Move routes into external file
module.exports = function(app) {
app.get('/', site.index);
app.get('/user', user.index);
app.get('/fail', user.fail);
app.post('/login',Modules.passport.authenticate('local', { successRedirect: '/user',
failureRedirect: '/fail'}));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment