Last active
April 5, 2019 02:51
-
-
Save desaijay315/9ce913bfea302313fe24675bbf7a721c to your computer and use it in GitHub Desktop.
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
| const mongoose = require('mongoose'); | |
| mongoose.connect('mongodb://<user>:<password>@ds127644.mlab.com:27644/nodeauth',{ | |
| useNewUrlParser: true, | |
| useCreateIndex: true | |
| }).then(() =>{ | |
| console.log('connected to database'); | |
| }).catch(() =>{ | |
| console.log('failed connected to database'); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment