chat_demo icon indicating copy to clipboard operation
chat_demo copied to clipboard

Simple demo of using websockets for a simple chat program

A very simple chat demo that uses websockets. I have used it in a QCon presentation. It uses cowboy and JQuery.

After doing 'make' two ways of starting chat_demo are:

  1. Start a chat_demo erlang release with an Erlang shell:

$ ./_rel/chat_demo/bin/chat_demo console

  1. If you have already built cowboy, ranch and cowlib and they are in you erlang path you can do:

1> chat_demo:start(). ok 2>

You can then access the chat system from the browser by going to port 8080 on the current machine.

The LFE versions of chat_server and chat_ws_handler are also included.

NOTE: the browser front-end is severely lacking and needs much work.