Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MongoClient.connect(url , function(err,db){
- if (err) return;
- app.post('/login' , urlencoder , function(req,res){
- var user = {
- UserName : req.body.UserName ,
- Password : req.body.Password
- };
- db.collection('project1').find({user}).forEach(function(pes){
- if(true)
- {
- console.log(pes);
- }
- else
- {
- res.redirect('/main');
- }
- });
- });
- });
Add Comment
Please, Sign In to add comment