Short example of node.js Express method to POST resource data into MongoDB. This was just a snippet for my blog to illustrate the simplicity of using MongoDB. Assume the data has already been validated, and MongoDB connection established.
resource.post (req, res) ->
collection.insert req.body, safe:true, (error, data) ->