Created
July 16, 2015 05:55
-
-
Save Shekharrajak/ce9ee6a87880c65d1264 to your computer and use it in GitHub Desktop.
For the tutorial on medium.com : passportJS auth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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