Created
February 29, 2012 18:26
-
-
Save julik/1943331 to your computer and use it in GitHub Desktop.
Revisions
-
josevalim revised this gist
Feb 29, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class MyApp < Rails::Application end # Let's shrink the stack by removing some middlewares. # The remaining stack is printed below. Add or remove stuff at will. config.middleware.delete "ActionDispatch::Static" config.middleware.delete "Rack::Lock" config.middleware.delete "Rack::MethodOverride" -
josevalim revised this gist
Feb 29, 2012 . No changes.There are no files selected for viewing
-
josevalim created this gist
Feb 29, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,53 @@ # Run this file with `RAILS_ENV=production rackup -p 3000 -s thin` # Be sure to have rails and thin installed. require "rubygems" require "rails" # Let's load only action controller. If you want # to use active record, just require it as well. require "action_controller/railtie" class MyApp < Rails::Application routes.append do match "/hello/world" => "hello#world" end # Let's shrink the stack by removing some middlewares. # The remaining stack is printed below. config.middleware.delete "ActionDispatch::Static" config.middleware.delete "Rack::Lock" config.middleware.delete "Rack::MethodOverride" config.middleware.delete "Rails::Rack::Logger" config.middleware.delete "ActionDispatch::DebugExceptions" config.middleware.delete "ActionDispatch::RequestId" config.middleware.delete "ActionDispatch::RemoteIp" config.middleware.delete "ActionDispatch::Reloader" config.middleware.delete "ActionDispatch::Flash" config.middleware.delete "ActionDispatch::BestStandardsSupport" # We need a secret token for session, cookies, etc. config.secret_token = "49837489qkuweoiuoqwehisuakshdjksadhaisdy78o34y138974xyqp9rmye8yrpiokeuioqwzyoiuxftoyqiuxrhm3iou1hrzmjk" end # This is a barebone controller. Include the modules you want, more info here: # http://piotrsarnacki.com/2010/12/12/lightweight-controllers-with-rails3/ class HelloController < ActionController::Metal include ActionController::Rendering def world render :text => "Hello world!" end end # Initialize the app MyApp.initialize! # Print the stack for fun! puts ">> Starting Rails lightweight stack" Rails.configuration.middleware.each do |middleware| puts "use #{middleware.inspect}" end puts "run #{Rails.application.class.name}.routes" # Run it! run MyApp