I have a library of functions dealing with songs & playlists (just metadata, no actual audio files) that exposes a bunch of functionality such as “get list of all songs”, “get list of songs filtered by P predicate”, “build a playlist of 10 songs starting from song X”, “get 5 songs that are compatible with song X” and so on…
I made a simple CLI app that calls into this library to provide basic functionality to the user. This is fine but this is can be inconvenient so I’d like to add a simple web UI that calls into the same library and allows the user to use a browser instead of the terminal.
Something very simple, like the user opens a browser on localhost and operate the program from there.
Can anybody recommend a good library to use for implementing the server? Since this is a learning exercise and I plan to keep it very simple, something easy to use and maybe with good docs would be appreciated.
PS: I have asked something similar a couple of years ago and got some suggestions, but things change fast so I hope I’m not bothering anyone by asking again
Seconding scotty, it’s great for small-scale stuff like this. You can start with the Hello World (or rather “scotty beam me up”) example and quickly build up from there. The types and documentation are mostly simple to follow, only thing I needed to wrap my head around for a bit was how to run a ScottyT app (the transformer version) with a custom monad, but you don’t necessarily need this.