-
-
Save edvakf/14a95e731c1b7a499ac2523d5a5d9438 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
$ mkdir rack-test | |
$ cd rack-test | |
$ vi Gemfile | |
$ vi config.ru | |
$ vi unicorn_config.rb | |
$ bundle install --path=.bundle | |
$ bundle exec unicorn -c ./unicorn_config.rb |
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
class Hello | |
def call(env) | |
[ 200, | |
{ 'Content-Type' => 'text/plain' }, | |
[env.inspect] | |
] | |
end | |
end | |
run Hello.new |
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
source 'https://rubygems.org' | |
gem 'rack' | |
gem 'unicorn' |
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
worker_processes 1 | |
listen 8000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment