Fork me on GitHub

@lfn3: mount does support passing arguments on start, see, if you want to go that route. If your handlers/routes state depends on your db state, it can check whether it has a proper database connection, or has a value in the likes of :failed, I think? In the latter case, it can set up its routes differently than in the former case. And to be more complete. In the app I am working on now I also have a routes state, which is indeed an atom (or actually, in my case, a ref). I can add and remove routes to and from the app, while the server keeps running. For me this works great, and could also work for you, maybe?