Created
December 17, 2014 13:58
-
-
Save 2get/3aa3951787928f7e71a5 to your computer and use it in GitHub Desktop.
The Single-File Rails Application
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 'rubygems' | |
require 'rails' | |
require 'active_support/railtie' | |
require 'action_dispatch/railtie' | |
require 'action_controller/railtie' | |
class SingleFile < Rails::Application | |
config.eager_load = true | |
config.cache_classes = true | |
config.secret_key_base = 'test' | |
routes.append do | |
root to: lambda { |env| | |
[200, { 'Content-Type' => 'text/plain' }, ['Hello world']] | |
} | |
end | |
end | |
SingleFile.initialize! | |
run Rails.application |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment