An open API service indexing awesome lists of open source software.

https://github.com/kutyel/hit-counter

Example Web Hit Counter with Scotty and Monad Transformers
https://github.com/kutyel/hit-counter

haskell haskell-exercises hit-counter monad-transformers monads scotty scotty-website

Last synced: about 1 month ago
JSON representation

Example Web Hit Counter with Scotty and Monad Transformers

Awesome Lists containing this project

README

        

# hit-counter

[![Actions Status](https://github.com/kutyel/hit-counter/workflows/Haskell%20CI/badge.svg)](https://github.com/kutyel/hit-counter/actions)
[![ormolu](https://img.shields.io/badge/styled%20with-ormolu-blueviolet)](https://github.com/tweag/ormolu)

Example Web Hit Counter with Scotty and Monad Transformers!

## Usage

First, start running the app:

```
*Main> :main lol
Setting phasers to stun... (port 3000) (ctrl-c to quit)
```

Then, on a different terminal, start hitting those URLs!

```sh
$ curl localhost:3000/woot

Success! Count was: 1


$ curl localhost:3000/woot

Success! Count was: 2


$ curl localhost:3000/blah

Success! Count was: 1


```