keveri / shortener

Testing Haskell servant library
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

shortener

A toy URL shortener API project for trying out haskell-servant and persistent libraries.

Configuration

The application expects a app.cfg file. See app.cfg.example for reference.

Development

Build

stack build

Tests

docker-compose up -d
stack test

Run

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.

Formatting

Format with hlint and stylish-haskell.