Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. app.post('/index',function(req,res){
  2.  
  3. MongoClient.connect(url, function(err, db) {
  4. if (err) throw err;
  5. var dbo = db.db("project");
  6.  
  7. dbo.collection("Register").findOne({}, function(err, result) {
  8.  
  9. if (result.Email == req.body.email && result.Password == req.body.psw) {
  10. console.log("OK");
  11. }
  12. else{
  13. console.log(result.Email && result.Password);
  14. }
  15. db.close();
  16. });
  17. });
  18. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement