Simple webchat. Written in Elm and Haskell. Uses websockets.
In /frontend
:
npm install chokidar-cli --save-dev
elm-package install
In /backend
:
stack install
stack build
Start a file watch server:
npm run watch
Copy static files to the output directory:
cp assets/* out/frontend
Run elm-reactor in out
to be able to use it as a server:
elm-reactor
And now you can visit http://localhost:8000/frontend/main.html
Run backend:
# assuming you have ~/.local/bin in your $PATH:
lambda-chat-backend-exe
Configure Nginx (or whatever) to serve frontend statically.
Run server in background process.
Download Elm docs
pip3 install --upgrade pip setuptools
brew install libmagic
pip3 install elm-doc
Generate Elm docs
elm-doc . --output docs
Use (for example spark as a server for static files)
go get github.com/rif/spark
~/go/bin/spark
Now you can visit 0.0.0.0:8080
and see the docs.
Dependencies of Elm project.
Chokidar is used to watch files and retranspile Elm every time some of its file changes.