This example demonstrates using Express with both error-first callbacks and promise-based APIs, both of which are common in the database world. This also shows how redirects and direct rendering can wait on an async database response.
To run:
npm install
node app
Just connect to localhost:5555 with your browser.