Created
June 20, 2012 13:00
-
-
Save ovaillancourt/2959782 to your computer and use it in GitHub Desktop.
This file contains 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 mongoose = require('mongoose'); | |
mongoose.connect("yourServerUrlHere", function(err){ | |
if(err){ | |
console.log("Error connecting:",err); | |
} | |
else{ | |
console.log('connected!'); | |
} | |
}); | |
//Url follows this pattern -> mongodb://YourLogin:YourPass@ServerIp/DatabaseName, the login and pass is not required if | |
//your server doesn't need authentication. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment