Research Article

HealthNode: Software Framework for Efficiently Designing and Developing Cloud-Based Healthcare Applications

Listing 6

Example of MongoDB INSERT operation.
(1)module.exports = function(app, mongoClient,mongoDBuri){
(2) app.post(‘/method’, function(req, res){
(3)  mongoClient.connect(mongoDBuri, function(err, database){
     ...
(11)   collection = database.collection(“testingCollection”);
(12)   //Instead of insert other functions(delete, find) works also
(13) collection.insert(postObject, function(err, records){});