Created
July 31, 2012 03:55
-
-
Save nnabeyang/3213385 to your computer and use it in GitHub Desktop.
ctrl+cでrackサーバーをシャットダウンする
This file contains hidden or 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
| require './hello_rack' | |
| run HelloRack.new |
This file contains hidden or 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
| require 'rack' | |
| class HelloRack | |
| def call(env) | |
| [200, {'Content-Type' => 'text/plain'}, ['Hello, Rack!']] | |
| end | |
| end |
This file contains hidden or 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
| require 'rack' | |
| #usage ./hello_rack_main --port PORT hello.ru | |
| Rack::Server.new.tap do|server| | |
| server.start | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment