Class: Miteru::Web::App
- Inherits:
-
Object
- Object
- Miteru::Web::App
- Defined in:
- lib/miteru/web/application.rb
Class Method Summary collapse
- .instance ⇒ Object
- .run!(port: 9292, host: "localhost", threads: "0:3", verbose: false, worker_timeout: 60, open: true) ⇒ Object
Class Method Details
.instance ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/miteru/web/application.rb', line 17 def instance Rack::Builder.new do use Rack::Session::Cookie, secret: SecureRandom.hex(32), same_site: true, max_age: 86_400 map "/" do run Sidekiq::Web end run App.new end.to_app end |
.run!(port: 9292, host: "localhost", threads: "0:3", verbose: false, worker_timeout: 60, open: true) ⇒ Object
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/miteru/web/application.rb', line 29 def run!(port: 9292, host: "localhost", threads: "0:3", verbose: false, worker_timeout: 60, open: true) Rackup::Handler::Puma.run( instance, Port: port, Host: host, Threads: threads, Verbose: verbose, worker_timeout: ) end |