Last active
August 7, 2017 14:03
-
-
Save jhass/5960353 to your computer and use it in GitHub Desktop.
Simple rack redirect app
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
| class Redirect | |
| def initialize target | |
| @target = target | |
| end | |
| def call env | |
| [301, {"Location" => @target}, []] | |
| end | |
| end | |
| run Redirect.new("http://diasporafoundation.org") |
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
| source "https://rubygems.org" | |
| ruby "2.0.0" | |
| gem 'rack' | |
| gem 'puma' | |
| group :development do | |
| gem 'foreman' | |
| 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
| GEM | |
| remote: https://rubygems.org/ | |
| specs: | |
| dotenv (0.8.0) | |
| foreman (0.63.0) | |
| dotenv (>= 0.7) | |
| thor (>= 0.13.6) | |
| puma (2.3.2) | |
| rack (>= 1.1, < 2.0) | |
| rack (1.5.2) | |
| thor (0.18.1) | |
| PLATFORMS | |
| ruby | |
| DEPENDENCIES | |
| foreman | |
| puma | |
| 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
| web: puma -p $PORT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you! ;D