Re: [mongoose] What should I include in the “Connection open” MongooseJS event?

17 views
Skip to first unread message

Aaron Heckmann

unread,
May 28, 2013, 11:43:00 AM5/28/13
to mongoo...@googlegroups.com
It doesn't matter whether you define it within the callback or not. I like seeing the "on open" declared bc it's more explicit.

On Saturday, May 25, 2013, Daniel wrote:

Do I must/should include Schemas/Models/so definitions inside the event's callback ? Or anything else at all ?

  • I saw this - "Important! Mongoose buffers all the commands until it's connected to the database. This means that you don't have to wait until it connects to MongoDB in order to define models, run queries, etc." - here - npm's mongoose docs

  • while this suggests a different approach Aaron Heckmann's answer here the whole app is inside this event.

Thanks.

--
Documentation - http://mongoosejs.com/
Plugins - http://plugins.mongoosejs.com/
Bug Reports - http://github.com/learnboost/mongoose
Production Examples - http://mongoosejs.tumblr.com/
StackOverflow - http://stackoverflow.com/questions/tagged/mongoose
Google Groups - https://groups.google.com/forum/?fromgroups#!forum/mongoose-orm
Twitter - https://twitter.com/mongoosejs
IRC - #mongoosejs
---
You received this message because you are subscribed to the Google Groups "Mongoose Node.JS ODM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongoose-orm...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
Aaron



Reply all
Reply to author
Forward
0 new messages