Backend webservice using Persistent, Servant, HSpec and more.
- Refactoring work:
- SQLite -> Postgres
- Create a Docker container for the app
- Run pre-commit linting
- Basic GitHub Actions CI Pipeline
- General re-architecture of app:
- App type from monad transformer stack to Eff
- Servant Record API's
- .. And more
- Refactoring repetitive code
- Add Logging middleware
First and foremost, if anybody has any feedback or pointers into how to improve this project I would love to hear it. Please leave a PR or Email me on [email protected]!
This project was an exercise in learning Persistent/Servant/HSpec. I also wanted to gain some more context for some advanced Haskell topics (such as Monad Transformer stacks) to better learn the language and become more familiar with a lot of common industry-used libraries and techniques.
The project has a few main goals :-
- Make an HTTP request to a Blizzard Endpoint for some JSON data.
- Parse and transform the API Response into something that can be stored in an SQL Database using Persistent.
- Create some Domain logic to operate on the Database entities.
- Use the results of said logic to serve relevant data as JSON to certain Endpoints created with Servant.
- Have some rudimentary testing in place to catch some easy bugs.
I'm quite happy with how it turned out so far - I might plan to add more Endpoints and extend the functionality.
Matt Roberts
- 0.1
- Initial Release
A big thanks to the FP Discord for continually being a compassionate source of help and learning, and a special thank you to Edmund Noble, for taking time out of his day to help me troubleshoot some issues I had with Servant.