Sha256: 90dffa4a987d4314a614db70dd4f6651a3e63955fc3a6e7fdecf6bebd9145238
Contents?: true
Size: 594 Bytes
Versions: 8
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'] || 8080 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
8 entries across 8 versions & 2 rubygems