Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.get('/process_get', function (req, res) {
- response = {
- first_name:req.query.firstName,
- last_name:req.query.lastName,
- username:req.query.userName,
- password:req.query.password,
- email:req.query.email
- };
- console.log(response);
- res.end(JSON.stringify(response));
- })
- MongoClient.connect("mongodb://localhost:27017/exampleDb", function(err, db) {
- if(err) { return console.dir(err); }
- if(!err) { console.log("MongoDB server is connected!") }
- var collection = db.collection('test');
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement