Sha256: f58451a774e1442cd0db64883aa2dffc791991b52977b9f1534ffe6f8a8a0aea
Contents?: true
Size: 466 Bytes
Versions: 1
Compression:
Stored size: 466 Bytes
Contents
require 'sinatra/base' module StripChart class Web def initialize(channel) @channel = channel end def run! puts "Starting a server on http://localhost:9999/" App.run!(:port => 9999, :server => 'webrick') do # system "open http://localhost:9999/" end end class App < Sinatra::Base get '/' do erb :index, :locals => { :web_socket_url => "ws://localhost:9998/data" } end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
stripchart-0.0.3 | lib/stripchart/web.rb |