Created
April 13, 2014 00:18
-
-
Save michaelrkn/10563326 to your computer and use it in GitHub Desktop.
The simplest Rails app (inspired by http://railscasts.com/episodes/349-rails-modularity)
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 "action_controller/railtie" | |
class TheSimplestRailsApp < Rails::Application | |
config.secret_token = "ef224177dc6ddcaabffafdbaa50cdb173eb744932073d" | |
config.eager_load = false | |
initialize! | |
routes.draw do | |
root to: "hello#world" | |
end | |
end | |
run TheSimplestRailsApp | |
class HelloController < ActionController::Base | |
def world | |
render inline: "hello world" | |
end | |
end | |
# start with `$ rackup` and visit localhost:9292 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment