Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
app.post('/login', function(req, res) { | |
console.log(res); | |
passport.authenticate('local', function(err, user) { | |
if (req.xhr) { | |
//thanks @jkevinburton | |
if (err) { return res.json({ error: err.message }); } | |
if (!user) { return res.json({error : "Invalid Login"}); } | |
req.login(user, {}, function(err) { | |
if (err) { return res.json({error:err}); } | |
return res.json( |