about db object init process of meanjs.org -





i'm reading meanjs.org source files learn , can't sure of db setup here. i've guess: db being fed there:

mongooseservice.connect(function (db) { 

is initialized in config.js , fed module on line, yet still can not understand, how extracted out of config object , please?

i decided ask here knows sure please tell me if understood mechanism correctly:

1. db defined in of environment modules, development, production, etc. found in mean/config/env/

2. in config.js method:

var initglobalconfig = function () {... 

on line collected other objects environmentconfig variable , here merged config object

3. config variable containing objects, including db, returned module , importing in app.js here brings in db object ready use.

i stay guess decided document here , ask make sure, hope other people trying figure out same thing, read , pay less time. thank you.





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -