Generalize creation of express app.

And hide some of the grosser bits.