Guest User

Untitled

a guest
Nov 4th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. MongoClient.connect(url , function(err,db){
  2. if (err) return;
  3.  
  4. app.post('/login' , urlencoder , function(req,res){
  5. var user = {
  6. UserName : req.body.UserName ,
  7. Password : req.body.Password
  8. };
  9. db.collection('project1').find({user}).forEach(function(pes){
  10. if(true)
  11. {
  12. console.log(pes);
  13. }
  14. else
  15. {
  16. res.redirect('/main');
  17. }
  18. });
  19. });
  20. });
Add Comment
Please, Sign In to add comment