A starter for building out haskell web services. The goal of this starter is to give you something to build on top of, with some of the fiddly bits taken care of for you, while providing a featureful and robust build and dev loop.
- Nix based build and dev environment
- Lots of tooling! 🔨
- Haskell Language Server, and VS-Code integration, just install the Haskell extension
- GHCiD
- Hoogle
- And more!
- Fork this repo
- If you're on macOS or Linux, you can call
./bin/rename-things my-awesome-ws
- If you're running another operating system you can manually replace "haskell-starter-webservice" in the following places
- config.nix
- default.nix
- haskell-starter-webservice.cabal
- README.md
- You will also need to rename the following files
- haskell-starter-webservice.cabal -> my-awesome-ws.cabal
- If you're running another operating system you can manually replace "haskell-starter-webservice" in the following places
- Update your name and email in your project's freshly-renamed .cabal file
- Run
nix-build
to ensure you renamed everything - Remove this introductory set of instructions and
bin/rename-things
- Build somethine awesome! 🚀
This project uses Nix for its builds.
You can build your project using nix build
, your build outputs will be in the result
directory.
Once you have built the server, you can run ./result/bin/haskell-starter-webservice
.
This project is able to serve swagger docs that are derived from the types of your routes and APIs. To start serving the
swagger-ui, run nix-build
, then ./result/bin/docserver
. Swagger-ui will start running on
http://localhost:8443/swagger-ui.
Basic configuration is included for the following CI providers: