Created
November 21, 2011 18:35
-
-
Save dgb/1383463 to your computer and use it in GitHub Desktop.
Single file Rails application
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 "action_controller/railtie" | |
class Application < Rails::Application | |
config.session_store :cookie_store, :key => '_rails_session' | |
config.secret_token = '095f674153982a9ce59914b561f4522a' | |
end | |
class PagesController < ActionController::Base | |
def index | |
render :text => "Hello, world!" | |
end | |
end | |
Application.routes.draw do | |
get '/' => 'pages#index' | |
end |
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 './application' | |
run Application |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment