Initial commit

This commit is contained in:
Joe Cheng
2012-06-20 11:48:08 -07:00
commit e28b3da1ba
5 changed files with 49 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
vendor/ruby

5
Gemfile Normal file
View File

@@ -0,0 +1,5 @@
source 'https://rubygems.org'
gem 'em-websocket'
gem 'rack'
gem 'webrick'

18
Gemfile.lock Normal file
View File

@@ -0,0 +1,18 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.2.8)
em-websocket (0.3.6)
addressable (>= 2.1.1)
eventmachine (>= 0.12.9)
eventmachine (0.12.10)
rack (1.4.1)
webrick (1.3.1)
PLATFORMS
ruby
DEPENDENCIES
em-websocket
rack
webrick

3
run.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
rvm 1.9.3 do bundle exec ruby server.rb

22
server.rb Normal file
View File

@@ -0,0 +1,22 @@
require 'em-websocket'
require 'rack'
class RapportApp
# Rack entry point
def call(env)
return [
200,
{'Content-Type' => 'text/html'},
["Hi"]
]
end
end
rapp = RapportApp.new
Rack::Server.new(
:app => rapp,
:Port => 8113,
:server => 'webrick').start