Created
December 2, 2012 18:44
-
-
Save dileephell/4190389 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'); | |
var Schema = mongoose.Schema; | |
module.exports.mongoose = mongoose; | |
module.exports.Schema = Schema; | |
//Connect to cloud database | |
var username = "Dileep" | |
var password ="******"; | |
var address ='@ds043917.mongolab.com:43917/erp'; | |
connect(); | |
//connect to mongo | |
function connect() | |
{ | |
var url ='mongodb:// mongolab.com/databases' + 'Dileep' +':' + '*******' +'@ds043917.mongolab.com:43917/erp'; | |
mongoose.connect(url); | |
} | |
function disconnect() | |
{ | |
mongoose.disconnect() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment