Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var collection = db.get('usercollection');
- console.log(collection);
- var userData = collection.find({username: userName});
- console.log(userData);
- if (userData.password == password) {
- console.log("authenticated!");
- }
- else {
- console.log("Username or password is incorrect");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement