Anonymous polls api with Servant and Persistent. It was written for practice and learning
- Haskell 87.3%
- Nix 12.7%
| app | feat: structure is ready | |
| src | chore: current stage | |
| .gitignore | feat: structure is ready | |
| CHANGELOG.md | feat: structure is ready | |
| flake.lock | feat: structure is ready | |
| flake.nix | feat: structure is ready | |
| LICENSE | feat: structure is ready | |
| poll-learning-xfeusw.cabal | chore: current stage | |
| README.md | refactor: /create to / | |
| shell.nix | feat: structure is ready | |
Polls API
Simple Haskell API for managing polls and options.
Run
cabal run poll-learning-xfeusw -- -d "postgresql://postgres:postgres@localhost:4456/postgres"
Server runs at http://localhost:4004.
API
Polls
POST /polls/– Create pollGET /polls/:id– Get poll with optionsGET /polls– List all polls with options
Options
POST /options/– Create optionGET /options/:id– Get optionGET /options– List all options
All responses are JSON.