Welcome to http4sws!
This is as a simple example of working with Websockets and http4s, and also an example rest api and store using doobie.
Run bin/start.sh
The api offers a simple document store.
You can test this with curl (assuming a document called picture.jpg):
curl -X POST -F '[email protected]' -H "Content-Type: image/jpeg" http://127.0.0.1:8080/document/1
curl http://127.0.0.1:8080/document/1 > downloaded.jpg
The easiest way to play is to run http4sws.Http4sWS and use Chrome's Simple Websocket Client using the url ws://localhost:8080/ws, and click Open. Type anything into the request field, the server will print it. The server will send updates from a fictional batch process periodically.
Contributions via GitHub pull requests are gladly accepted from their original author. Along with any pull requests, please state that the contribution is your original work and that you license the work to the project under the project's open source license. Whether or not you state this explicitly, by submitting any copyrighted material via pull request, email, or other means you agree to license the material under the project's open source license and warrant that you have the legal authority to do so.
This code is open source software licensed under the Apache-2.0 license.