Write port back to app.config if overwritten

The port is used in other places, such as when loading the model from stagecraft stubs in `app/process_request.js`. This means it can be reliably loaded with `app.get('port')` even if overwritten with environment variables.