invert dependencies for express, mind that server is started and stopped asynchronously in the smoke test

The dependency inversion is just a little preparation and will change dramatically with the use of views and a template engine.