Sha256: d5143018b16fa3c5971913f70baafddda3e4189ea9e2f4eadc18830a4e1d917b
Contents?: true
Size: 617 Bytes
Versions: 2
Compression:
Stored size: 617 Bytes
Contents
require 'nyny/base' require 'nyny/templates' require 'better_errors' require 'ostruct' module NYNY class App < Base inheritable :config, OpenStruct.new register NYNY::Templates use Rack::Chunked class << self def configure *envs, &block if envs.map(&:to_sym).include?(NYNY.env.to_sym) or envs.empty? instance_eval(&block) end end def run! port=9292 use Rack::CommonLogger use BetterErrors::Middleware unless NYNY.env.production? Rack::Handler.pick(['puma', 'thin', 'webrick']).run new, :Port => port end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nyny-3.4.2 | lib/nyny/app.rb |
nyny-3.4.1 | lib/nyny/app.rb |