added core executable

Adding a central binary forced me to rework the way the app gets
initiated and how the config is applied. Requiring the app will now
return a function which sets config and returns an express app.