A toy URL shortener API project for trying out haskell-servant
and persistent
libraries.
The application expects a app.cfg
file. See app.cfg.example
for reference.
stack build
docker-compose up -d
stack test
Start:
docker-compose up -d
stack exec shortener-exe
Example:
curl -X POST --header "Content-Type: application/json" --data '{"url": "a.com"}' 'localhost:8080/short'
View generated JS API client test at http://localhost:8080.
Format with hlint
and stylish-haskell
.