Skip to content

Instantly share code, notes, and snippets.

@johnpaulashenfelter
Forked from shawndrost/application.rb
Created October 19, 2017 11:13
Show Gist options
  • Select an option

  • Save johnpaulashenfelter/870d25ce9ea02b163ef3747dd5fd4755 to your computer and use it in GitHub Desktop.

Select an option

Save johnpaulashenfelter/870d25ce9ea02b163ef3747dd5fd4755 to your computer and use it in GitHub Desktop.
Single file Rails application
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
require './application'
run Application
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment