SHARE
TWEET

Untitled

a guest Jun 16th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.  });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top