newlandsvalley / tunebank

RESTful server for tunes represented in the ABC notation
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Add configuration #8

Closed newlandsvalley closed 4 years ago

newlandsvalley commented 4 years ago

Possibly use http://hackage.haskell.org/package/configurator-0.3.0.0/docs/Data-Configurator.html? The configuration file format will probably be almost identical to musicrest,conf.

newlandsvalley commented 4 years ago

We now have tunebank.conf. The next step is to run the server in a custom monad (presumably of type ReaderT AppCtx Handler) by hoisting it with hoistServertWithContext. See https://haskell-servant.readthedocs.io/en/stable/cookbook/hoist-server-with-context/HoistServerWithContext.html. Here. AppCtx holds the configuration data we get from configurator.

newlandsvalley commented 4 years ago

Fixed by 8cc6fd96c31579c1ebdfbf8fef8b1d28b0c973d7.