Advertisement
Guest User

Untitled

a guest
Feb 8th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. app.get('/process_get', function (req, res) {
  2. response = {
  3. first_name:req.query.firstName,
  4. last_name:req.query.lastName,
  5. username:req.query.userName,
  6. password:req.query.password,
  7. email:req.query.email
  8. };
  9. console.log(response);
  10. res.end(JSON.stringify(response));
  11. })
  12.  
  13. MongoClient.connect("mongodb://localhost:27017/exampleDb", function(err, db) {
  14. if(err) { return console.dir(err); }
  15. if(!err) { console.log("MongoDB server is connected!") }
  16.  
  17. var collection = db.collection('test');
  18. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement