Skip to content

KCreate/livechat.cr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

livechat.cr

Simple little Livechat written in crystal. It uses kemal, events and WebSockets.

Installation

Clone the repo and run src/main.cr. You may need to update your firewall settings for the server to be able to listen on port 3000.

This project is developed and tested on OS X El Capitan on a Retina Macbook Pro late 2013.

Usage

This is only the backend, you'd have to write your own front-end to really use this. Sorry.

Development

Launch the server and navigate to localhost:3000/index.html

This will do some initialization work in the background via Javascript. It just connects to the socket. You can then send your own commands to the livechat via the global socket variable in the Javascript console.

This looks something like that:

socket.send(JSON.stringify({
    type: 'change_name',
    name: 'Leonard Schuetz'
}));

A list of all available commands is inside the src/commands directory.

Contributing

  1. Fork it (https://github.com/kcreate/livechat.cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • KCreate Leonard Schuetz - creator, maintainer

About

WORK IN PROGRESS livechat written in Crystal

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published