Created
April 23, 2019 15:00
-
-
Save devdarren7/8a2de6b1ee1bc1ee21dea48be1d80269 to your computer and use it in GitHub Desktop.
Mongoose db insert one example
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
| db.collection('admin').insert({accessToken: accessToken , email: 'admin@gmail.com' } , (err, result) => { | |
| if (err) return console.log(err) | |
| console.log('saved to database' + accessToken); | |
| res.render('pages/main-dash'); | |
| //res.render('index', { accessToken: JSON.stringify(accessToken)} ); | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment