sse

0.3.0 released
y2k2mt/sse.cr
20
Yukio Kakumoto

server-sent-events

Build Status Releases

Server-Sent-Events library for crystal.

Now supports only client.

Installation

  1. Add the dependency to your shard.yml:
dependencies:
  sse:
    github: y2k2mt/sse.cr
    version: 0.3.0
  1. Run shards install

Usage

sse = HTTP::ServerSentEvents::EventSource.new("http://app/ssedemo")

sse.on_message do |message|
  # Recieving messages from server
  p message.data
end

sse.run

How to test

# Running node sse server
npm install
npm start &

# Run specs
crystal spec

Contributing

  1. Fork it (https://github.com/y2k2mt/sse.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

  • y2k2mt - creator and maintainer
sse:
  github: y2k2mt/sse.cr
  version: ~> 0.3.0
License MIT
Crystal 0.29.0

Authors

Dependencies 0

Development Dependencies 1

  • ameba 0.10.0
    {'github' => 'veelenga/ameba', 'version' => '0.10.0'}

Dependents 0

Last synced .
search fire star recently