Created
August 22, 2017 17:45
-
-
Save joshleblanc/84b7bbee9d4b75c3b2895228f1701a5a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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