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.
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.