Skip to content

Instantly share code, notes, and snippets.

Nicolas ngarneau

Block or report user

Report or block ngarneau

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ngarneau / chat.rb
Created Dec 14, 2011 — forked from rkh/chat.rb
Simple Chat Application using the Sinatra Streaming API
View chat.rb
# coding: utf-8
require 'sinatra'
set server: 'thin', connections: []
get '/' do
halt erb(:login) unless params[:user]
erb :chat, locals: { user: params[:user].gsub(/\W/, '') }
get '/stream', provides: 'text/event-stream' do
You can’t perform that action at this time.