I found several tutorials and examples on how to deploy a Node.js app to Heroku but most of those suppose you're using Mongoose or mLab while I'm using Monk.
So in my app.js I have:
var db = monk('localhost:27017/dbname');
[...]
app.use(function(req,res,next){
req.db = db;
next();
});
All I need is to store users/members and maybe eventually to show some data out of the info recorded in the DB during the registration process. This just to say that there will not be a lot of tables nor complex DB interactions.
In the dev environment everything is working well and I'm thinking of deploying a first version to Heroku, but I'm just very confused about how to handle all this DB stuff.
I suppose I still want to use my local DB when I'm developing while a different DB will be used in the production system but I'm really not sure how to set this up (and actually handle the production DB).
So my question is basically how do I make my app use a different connection string when deploying in production? Do you also have suggestions about the db to use in production considering I'm deploying to Heroku?
I would appreciate if someone could point me in the right direction, thanks.