Sha256: eb2b17f6f368f3410e7946892ee776fa47706ac95e1a7c444c50ddc6ba4732c5
Contents?: true
Size: 594 Bytes
Versions: 22
Compression:
Stored size: 594 Bytes
Contents
class App def self.running @running ? true : false end def self.port ENV['PORT'] || 5000 end def self.ws_port ENV['WS_PORT'] || 5001 end def self.url "http://localhost:#{port}" end def self.websocketio_url "ws://localhost:#{ws_port}" end def self.cometio_url "http://localhost:#{port}/cometio/io" end def self.app_dir File.expand_path 'app', File.dirname(__FILE__) end def self.start return if running @running = true cmd = "cd #{app_dir} && WS_PORT=#{ws_port} rackup config.ru -p #{port}" system cmd end end
Version data entries
22 entries across 22 versions & 2 rubygems