Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.post("/login", function(req, res) {
- db.collection('signup').findOne({ $and: [ { username: req.body.loginUsername }, { password: req.body.loginPassword} ] }, function(err,user){
- if(err){
- console.log(err);
- return res.status(500).send();
- }
- if(!user){
- res.send("Username or Password did not match");
- }
- app.get("/profile", function(req,res){
- res.render("pages/profile.ejs", { username: req.body.loginUsername })
- });
- });
- });
Add Comment
Please, Sign In to add comment