Created
October 30, 2017 11:17
-
-
Save brunokrebs/3d9a2a471ca10166dbb5d9ef1825b9a8 to your computer and use it in GitHub Desktop.
Webtask and MongoDB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var parallel = require('async').parallel; | |
var MongoClient = require('[email protected]').MongoClient; | |
module.exports = function (ctx, done) { | |
var url = 'mongodb://bkrebs:[email protected]:23410/brunokrebsauth0' | |
MongoClient.connect(url, function (err, db) { | |
if(err) return done(err); | |
db.collection('test').insertOne({ | |
name: 'Bruno [email protected]', | |
time: new Date() | |
}, done); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment