Last active
August 28, 2017 21:22
-
-
Save henadzit/ee1a3593660aaa4ba36288752382908c to your computer and use it in GitHub Desktop.
Minimal one-page rails 5 application, run with `rackup -p 3030`
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 TestApp < Rails::Application | |
secrets.secret_token = "secret_token" | |
secrets.secret_key_base = "secret_key_base" | |
config.logger = Logger.new($stdout) | |
Rails.logger = config.logger | |
routes.draw do | |
root "home#index" | |
end | |
end | |
class HomeController < ActionController::Base | |
def index | |
render inline: 'Hello, World!' | |
end | |
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 TestApp |
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
source 'https://rubygems.org' | |
gem 'rails', '5.1.3' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment