Config is Missing
darionyaphet opened this issue · comments
example nodejs-mongodb-mongoose-restify is missing config moudle
I run command on terminal as following ~
nodejs-mongodb-mongoose-restify ➤ node server.js git:gh-pages
module.js:340
throw err;
^
Error: Cannot find module './config'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/lucien/yaphets/backbonetutorials/examples/nodejs-mongodb-mongoose-restify/server.js:11:14)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
thanks
You're supposed to create your own ;-D because you'll be using your information not mine and we don't want to commit anything private to a public repo.
see configSample.js - then create your own version of it and rename it config.js
this is also covered in the readme file at the bottom - check that out
ok I found it thx
great to hear - you did raise an interesting point - a config file is not really required for this demo - it would be easier without one - feel free to skip it ;-D - one could simply hard code in your localhost info which we'd all probably have in common - it's just when we get to actually deploying - to whatever hosting platform - we need to have unique connection strings and then the config file becomes important for privacy.
Anyways, thanks for the feedback - I'll try to update the readme with this advice - I also remembering scratching my head at it when I first encountered it and wondered why Thomas included it. It's mainly just for Github and can be skipped in your own projects.