Skip to content

Instantly share code, notes, and snippets.

@joshleblanc
Created August 22, 2017 17:45
Show Gist options
  • Save joshleblanc/84b7bbee9d4b75c3b2895228f1701a5a to your computer and use it in GitHub Desktop.
Save joshleblanc/84b7bbee9d4b75c3b2895228f1701a5a to your computer and use it in GitHub Desktop.
app = Rack::Builder.new do
use Rack::SSL
use Rack::Deflater
use Rack::Static,
urls: %w(/img /js /fonts /css),
root: 'public/'
run Rack::URLMap.new(
'/' => Site::Main,
'/admin' => Admin::Main,
'/translations' => Translations::Main
)
end
Rack::Handler::Thin.run(app, Port: 9292) do |server|
server.ssl = true
server.ssl_options = {
:cert_chain_file => ENV['SSL_CERT'],
:private_key_file => ENV['SSL_PK'],
:verify_peer => false
}
server.threaded = true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment