Sha256: 544eb86083f7cacaa2a91d622671656ef75579c08768379c304830408aa334bb
Contents?: true
Size: 670 Bytes
Versions: 13
Compression:
Stored size: 670 Bytes
Contents
namespace :lamby do task :proxy_server => [:environment] do require 'webrick' port = ENV['LAMBY_PROXY_PORT'] || 3000 bind = ENV['LAMBY_PROXY_BIND'] || '0.0.0.0' Rack::Handler::WEBrick.run Lamby::ProxyServer.new, Port: port, BindAddress: bind end task :proxy_server_puma => [:environment] do port = ENV['LAMBY_PROXY_PORT'] || 3000 host = ENV['LAMBY_PROXY_BIND'] || '0.0.0.0' lamby_proxy = Lamby::ProxyServer.new maybe_later = MaybeLater::Middleware.new(lamby_proxy) server = Puma::Server.new(maybe_later) server.add_tcp_listener host, port puts "Starting Puma server on #{host}:#{port}..." server.run.join end end
Version data entries
13 entries across 13 versions & 2 rubygems