Probably my error, but I'm having a bit of trouble configuring MongoDB in my local development environment.
I have Mongo running (mongod) and have created an empty DB (angular-express-train) as well as updated the default.json in config to read:
"mongodb":{
"uri":"mongodb://localhost:27017/angular-express-train"
},
okapi:angular-express-train rob$ train run
[express train application listening on 3000]
========================================================================================
= Please ensure that you set the default write concern for the database by setting =
= one of the options =
= =
= w: (value of > -1 or the string 'majority'), where < 1 means =
= no write acknowlegement =
= journal: true/false, wait for flush to journal before acknowlegement =
= fsync: true/false, wait for flush to file system before acknowlegement =
= =
= For backward compatibility safe is still supported and =
= allows values of [true | false | {j:true} | {w:n, wtimeout:n} | {fsync:true}] =
= the default value is false which means the driver receives does not =
= return the information of the success/error of the insert/update/remove =
= =
= ex: new Db(new Server('localhost', 27017), {safe:false}) =
= =
= http://www.mongodb.org/display/DOCS/getLastError+Command =
= =
= The default of no acknowlegement will change in the very near future =
= =
= This message will disappear when the default safe is set on the driver Db =
========================================================================================
Exiting process due to uncaught exception!
OverwriteModelError: Cannot overwrite `Todo` model once compiled.
at Mongoose.model (/Users/rob/dev/heroku/angular-express-train/node_modules/mongoose/lib/index.js:278:13)
at module.exports (/Users/rob/dev/heroku/angular-express-train/app/models/Todo.js:11:21)
at /Users/rob/dev/heroku/angular-express-train/node_modules/express-train/node_modules/nject/lib/nject.js:176:33
at Array.forEach (native)
at Function._.each._.forEach (/Users/rob/dev/heroku/angular-express-train/node_modules/express-train/node_modules/underscore/underscore.js:78:11)
at Tree.resolve (/Users/rob/dev/heroku/angular-express-train/node_modules/express-train/node_modules/nject/lib/nject.js:163:7)
at createApplication (/Users/rob/dev/heroku/angular-express-train/node_modules/express-train/lib/app.js:89:17)
at Object.<anonymous> (/Users/rob/dev/heroku/angular-express-train/app/index.js:3:18)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
okapi:angular-express-train rob$