@ -45,7 +45,6 @@ Table of Contents
|
|||||||
- [How It Works](#how-it-works-mini-guides)
|
- [How It Works](#how-it-works-mini-guides)
|
||||||
- [Mongoose Cheatsheet](#mongoose-cheatsheet)
|
- [Mongoose Cheatsheet](#mongoose-cheatsheet)
|
||||||
- [Deployment](#deployment)
|
- [Deployment](#deployment)
|
||||||
- [TODO](#todo)
|
|
||||||
- [Contributing](#contributing)
|
- [Contributing](#contributing)
|
||||||
- [License](#license)
|
- [License](#license)
|
||||||
|
|
||||||
|
4
app.js
4
app.js
@ -87,7 +87,7 @@ app.use(function(req, res, next) {
|
|||||||
// Keep track of previous URL
|
// Keep track of previous URL
|
||||||
if (req.method !== 'GET') return next();
|
if (req.method !== 'GET') return next();
|
||||||
var path = req.path.split('/')[1];
|
var path = req.path.split('/')[1];
|
||||||
if (/(auth|login|logout|signup)$/.test(path)) return next();
|
if (/(auth|login|logout|signup)$/i.test(path)) return next();
|
||||||
req.session.returnTo = req.path;
|
req.session.returnTo = req.path;
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
@ -188,7 +188,7 @@ app.get('/auth/venmo/callback', passport.authorize('venmo', { failureRedirect: '
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
app.listen(app.get('port'), function() {
|
app.listen(app.get('port'), function() {
|
||||||
console.log("✔ Express server listening on port %d in %s mode", app.get('port'), app.settings.env);
|
console.log("✔ Express server listening on port %d in %s mode", app.get('port'), app.get('env'));
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = app;
|
module.exports = app;
|
||||||
|
Reference in New Issue
Block a user