Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.post('/index',function(req,res){
- MongoClient.connect(url, function(err, db) {
- if (err) throw err;
- var dbo = db.db("project");
- dbo.collection("Register").findOne({}, function(err, result) {
- if (result.Email == req.body.email && result.Password == req.body.psw) {
- console.log("OK");
- }
- else{
- console.log(result.Email && result.Password);
- }
- db.close();
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement