Skip to content

Instantly share code, notes, and snippets.

View vosechu's full-sized avatar

Chuck Lauer Vose vosechu

View GitHub Profile
@vosechu
vosechu / chat.rb
Last active December 14, 2015 11:19 — forked from rkh/chat.rb
Updated for jquery 1.9.1
# 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/, '') }
end
get '/stream', provides: 'text/event-stream' do