Skip to content

Instantly share code, notes, and snippets.

View kenichi's full-sized avatar

Kenichi Nakamura kenichi

  • Portland, Oregon
View GitHub Profile
@kenichi
kenichi / sse.rb
Last active August 29, 2015 14:03 — forked from tpitale/server.rb
require 'reel'
require 'json'
require 'pry'
class Server < Reel::Server::HTTP
include Celluloid::Logger
def initialize host = '127.0.0.1', port = 4567
info "listening on #{host}:#{port}"
super host, port, &method(:on_connection)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.