madhums/mongoose-migrate — pull request #1 by sanelson2000 (2014-10-20 14:37:12+00:00)
Title: Fix several hanging issues

When I tried to use this package, I had lots of problems. It was throwing errors because it was trying to open the same mongo connection twice, it would just hang when migrations were complete. It would hang silently if the migrations threw an error, never displaying the error, and the necessity to always set the configuration file in an environment variable makes working with a team much more difficult. So this pull request addresses all of these issues. It will now exit properly when migrations have finished. If a migration throws an error up the stack, it will log that error to the console and exit. It only tries to connect to MongoDB once, and if the environment variable for the configuration file is not defined, it will default to ./config/migrations.js.