rearange the server app to make config writable