This repository serves as a minimal example of an elixir websocket server.
plug_cowboy is the only dependency of this project. this project does not use Phoenix framework.
This project has been tested with:
Erlang/OTP 24
Elixir 1.13.4 (compiled with Erlang/OTP 22)
Clone this repository and run:
mix deps.get
mix run --no-halt
The websocket server endpoint is hosted at:
ws://127.0.0.1:3000/ws
Upon connecting, the server will send message "Hello from websocket server!" to all connected sockets in a 1 second interval.