Skip to content

Commit

Permalink
Mostly formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
aviflombaum committed Sep 16, 2015
1 parent 4bf329d commit 267ab46
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 17 deletions.
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,19 @@

1. Create a basic Sinatra application.
2. Write a `get` method.
3. Render a string from that `get` method.

3. Render a string from that `get` method.

## Instructions

Fork and clone this repository and run bundle install to get started!

Run shotgun to start a local server so that you can test your app in your browser. Shotgun default is using port 9393, you should be able to visit the following url `http://localhost:9393`.


1. Write a `get` method in the `app.rb`file.
2. The `get` method should render the string `"Hello, World!"`.
1. Write a `get` method in the `app.rb` file to respond to the root URL '/'.
2. The `get` route should respond with the string `"Hello, World!"`.

You can run `learn` to see error messages.


## Recourses

[Sinatra Basics](https://github.com/learn-co-curriculum/sinatra-basics)



8 changes: 5 additions & 3 deletions app.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
require_relative 'config/environment'

class App < Sinatra::Base
end

# Define your GET '/' route below and respond with "Hello, World!"


end
2 changes: 1 addition & 1 deletion config.ru
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
require './config/environment'

run App
run App
3 changes: 2 additions & 1 deletion config/environment.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ENV['SINATRA_ENV'] ||= "development"
ENV['RACK_ENV'] ||= "development"

require 'bundler/setup'
Bundler.require(:default, ENV['SINATRA_ENV'])

require './app'
require_relative './app'
2 changes: 0 additions & 2 deletions spec/sinatra_hello_world_basics_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'spec_helper'

describe "GET '/'" do
before do
get '/'
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@

def app
Rack::Builder.parse_file('config.ru').first
end
end

0 comments on commit 267ab46

Please sign in to comment.