Created
February 16, 2014 03:28
-
-
Save rgaidot/9028822 to your computer and use it in GitHub Desktop.
Ruby on Rails Lightweight
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
require "rails" | |
require "action_controller/railtie" | |
class RoRLightweight < Rails::Application | |
routes.append do | |
get "/welcome" => "welcome#index" | |
end | |
config.cache_classes = true | |
config.middleware.delete "Rack::Lock" | |
config.middleware.delete "ActionDispatch::Flash" | |
config.middleware.delete "ActionDispatch::BestStandardsSupport" | |
config.secret_token = "1542f8fae401d3ec3a736b10e2cb11ec6a7ad0da11dfe7d94a453b4579184fd7aefe1f0500bdb74f5bfdb8b062163b83abed94c53b901a4a0219458f8f47fce6" | |
end | |
class WelcomeController < ActionController::Metal | |
include ActionController::Rendering | |
def index | |
render :text => "Hello world!" | |
end | |
end | |
RoRLightweight.initialize! | |
run RoRLightweight |
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 :rubygems | |
gem "actionpack", "~> 4.0" | |
gem "railties", "~> 4.0" | |
gem "tzinfo" | |
gem "thin" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment