I've got a fairly "typical" setup (I'm using RailwayJS)
schema:
customSchema(function(){
// Initialize Mongo DB
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
mongoose.connect('mongodb://localhost/mydb'); //todo: needs to come from connection or something?!
var MyModel = new Schema({
name : String,
email : String,
something : String
});
});
My question is, how can I specify the connection string to use?
Should I move the mongoose.connect part out into my config section?