Skip to content

Instantly share code, notes, and snippets.

@dileephell
Created December 2, 2012 18:44
Show Gist options
  • Save dileephell/4190389 to your computer and use it in GitHub Desktop.
Save dileephell/4190389 to your computer and use it in GitHub Desktop.
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