Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drewolson/effectful-servant-example
https://github.com/drewolson/effectful-servant-example
Last synced: about 15 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/drewolson/effectful-servant-example
- Owner: drewolson
- License: bsd-3-clause
- Created: 2024-05-07T00:05:26.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-12-23T15:27:07.000Z (18 days ago)
- Last Synced: 2024-12-23T15:36:40.793Z (18 days ago)
- Language: Haskell
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# example
```
stack run
``````
$ curl localhost:3000/item/0
{"itemId":0,"itemText":"Drew"}%
``````
$ curl -v localhost:3000/item/1
* Host localhost:3000 was resolved.
...
< HTTP/1.1 404 Not Found
< Transfer-Encoding: chunked
< Date: Mon, 23 Dec 2024 15:23:24 GMT
< Server: Warp/3.3.31
``````
$ curl localhost:3000/stream
{"itemId":2,"itemText":"Drew"}
{"itemId":4,"itemText":"Drew"}
{"itemId":6,"itemText":"Drew"}
{"itemId":8,"itemText":"Drew"}
{"itemId":10,"itemText":"Drew"}
{"itemId":12,"itemText":"Drew"}
{"itemId":14,"itemText":"Drew"}
{"itemId":16,"itemText":"Drew"}
{"itemId":18,"itemText":"Drew"}
{"itemId":20,"itemText":"Drew"}
```