I am working on an express app. I've separated my route logic outside of 
the app.js file, which I'm using for config. I'm trying to configure my db 
in app.js and export this into any route module that needs it.

Here is my db code that i'm pulling into app.js.

db file snippet
https://gist.github.com/4076060

app.js file snippet
https://gist.github.com/4076065

The output from console.log(db); in the app.js file appears to be an empty 
object. However, when I reference a function such as console.log(db.create) 
it returns [ Function ]. Why does console.log(db) return {} and not 
something like {create: [ Function ].....}

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to