I got error message like this:
Error: Cannot find module '/app/config'
at Function._resolveFilename (module.js:332:11)
at Function._load (module.js:279:25)
at Module.require (module.js:354:17)
at require (module.js:370:17)
at Object.<anonymous> (/app/models/index.js:2:11)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
at Module.require (module.js:354:17)
Error: Restarted too many times, bailing.
below is how my files organized.
/app.js
/config.js
/other files..
/models/index.js
In /models/index.js, first I used relative path like this:
var config = require('../config).config;
and it show error message like above, just a litte different in path. I google some artices, find out thate I can't use relative path in Nodester, it must use absolute path, so I change path to :
require('/app/config').config
or
require('/config').config
it all got errors...
am I doing wrong in somewhere?
btw, I use node v-0.6.12,and the app works fine in local machine.