juspay / todo-app

A demo Haskell app showing the use of Nix with flake-parts to simplify various dev workflows
MIT License
6 stars 2 forks source link

todo-app

A simple TODO app in Haskell using PostgREST as a RESTful API for PostgreSQL.

[!NOTE] This app is a demo to showcase how developer experience in a Haskell project can be improved using Nix. We primarily use haskell-flake, services-flake and flake-parts to achieve this.

Tutorial

Learn with our blog post series:

Getting Started

Install Nix

Development

nix develop

To enter development shell on cd, use direnv

[!NOTE] just services starts postgres and postgrest, both of which bind to Unix socket.

just services
# Watch for changes in the Haskell code
just watch

Run through Nix

[!NOTE] todo-app-services-tcp starts postgres, which listens on Unix socket, while postgrest listens on TCP port 3000.

nix run github:juspay/todo-app#todo-app-services-tcp
nix run github:juspay/todo-app -- view