Skip to content

Instantly share code, notes, and snippets.

@Shekharrajak
Created July 16, 2015 05:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shekharrajak/ce9ee6a87880c65d1264 to your computer and use it in GitHub Desktop.
Save Shekharrajak/ce9ee6a87880c65d1264 to your computer and use it in GitHub Desktop.
For the tutorial on medium.com : passportJS auth
module.exports.routes = {
/***************************************************************************
* *
* Make the view located at `views/homepage.ejs` (or `views/homepage.jade`, *
* etc. depending on your default view engine) your home page. *
* *
* (Alternatively, remove this and add an `index.html` file in your *
* `assets` directory) *
* *
***************************************************************************/
'/': {
view: 'homepage'
},
/***************************************************************************
* *
* Custom routes here... *
* *
* If a request to a URL doesn't match any of the custom routes above, it *
* is matched against Sails route blueprints. See `config/blueprints.js` *
* for configuration options and examples. *
* *
***************************************************************************/
'get /login': {
view: 'login'
},
'post /login': 'AuthController.login',
'/logout': 'AuthController.logout',
'get /signup': {
view: 'signup'
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment