This common lisp project is an example of using websockets to create a browser based chat. In particular, it is a proof of concept using the first two libraries.
- websocket-driver: websocket server (using clack) in common lisp. This project ignores the websocket client side.
- caveman2: web framework that uses clack as the web-server front end and djula as the html template engine. This example uses hunchentoot as the web-server backend. This example ignores the DB part of caveman.
- event-emitter: used in websocket-driver but also used to control the chat room.
- jonathan: to encode and decode JSON on the server side
- parenscript: to generate browser side javascript including browser side websocket client.
- log4cl: to generate logging information to understand what is going on.
- string-case: fast
case
for strings - alexandria: utilities
Another example project
Clone this project into quicklisp's local-project directory or another directory asdf's search path (i.e. ~/common-lisp).
(ql:quickload :wsd-caveman-chat)
All dependencies are in quicklisp.
After installation and loading of the system, in the repl:
(wsd-caveman-chat:start)
Then open your browser to http://localhost:8080/.
Want to use a different port? Do this instead:
(wsd-caveman-chat:start :port 5000)
To stop,
(wsd-caveman-chat:stop)
- andy peterson (andy.arvid@gmail.com)
No copyright is claimed by the author and you can copy the code as you wish
Licensed under the Unlicense License.