afloyd / mongo-migrate

MIT License
159 stars 81 forks source link

Enabled calling of run() asynchronously #34

Closed TimJohns closed 9 years ago

TimJohns commented 9 years ago

The code below allows the caller to specify an optional next() function, which allows run() to be used asynchronously.

I found this useful where I have an Express server that applies migrations at startup - I didn't want the server to start until all migrations had been applied.