Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

падение при включенной mongodb #28

Closed
kirill256 opened this issue Jan 30, 2014 · 3 comments
Closed

падение при включенной mongodb #28

kirill256 opened this issue Jan 30, 2014 · 3 comments
Labels

Comments

@kirill256
Copy link

при включении в /config/plugins.js
"db.mongodb"
после запуска падает:

Impress Application Server starting, reading configuration
Exception in master process
TypeError: Cannot set property 'mongodb' of undefined
at global.db (/node_modules/impress/lib/db.mongodb.js:7:22)
at Object. (/node_modules/impress/lib/db.mongodb.js:43:3)
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 Module.require (module.js:364:17)
at require (module.js:380:17)
at loadPlugins (/node_modules/impress/lib/impress.js:227:17)
at /node_modules/impress/lib/impress.js:276:4
Impress shutting down

@kirill256
Copy link
Author

я так понимаю require('./db'); где то в impress.js потерялось, добавил вроде заработало...

@tshemsedinov
Copy link
Member

В /config/plugins.js нужно добавить не только "db.mongodb", но до него еще и "db", а impress.js не нужно трогать. Так сделано, потому, что есть приложения вообще без доступа к БД, как прослойка между бэкенд-API и фронтендом, или работающие с файлами или с собственной памятью только, и в них желательно максимально сократить кол-во загруженных модулей.

@kirill256
Copy link
Author

извиняюсь, тупанул...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants