540co / ads-bpa

Drug Reactions Explained (DRE) provides clear definitions to complex medical terms used to describe the adverse reactions patients have experienced when taking certain drugs (18F Agile BPA Development Prototype)
https://dre.540.co
Creative Commons Zero v1.0 Universal
13 stars 5 forks source link

When MongoDB is first started (no collections) #262

Closed jobrieniii closed 9 years ago

jobrieniii commented 9 years ago

APIs result in 500 errors and bad error message.

Recommend that we confirm the collections are in place at startup in node.

jobrieniii commented 9 years ago

Could not fully reproduce this issue on local machine.

Not sure if this possibly resulted when mongo container was still being started (which was when the issue was noted during a deployment to dev).

To be proactive and warm a newly created / refreshed mongodb, a db.createCollection is called for each collection defined in the config during app server startup.