-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
first try #224
base: main
Are you sure you want to change the base?
first try #224
Conversation
@@ -17,3 +17,5 @@ end | |||
group :development, :test do | |||
gem 'rubocop', '1.20' | |||
end | |||
|
|||
gem "reloader", "~> 0.1.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this? Did you mean sinatra?
@@ -88,6 +134,7 @@ PLATFORMS | |||
DEPENDENCIES | |||
capybara | |||
pg | |||
reloader |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sinatra?
end | ||
|
||
post'/peeps' do | ||
# erb :'newpeep' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note required?
connection = PG.connect(dbname: 'chitter') | ||
result = connection.exec("SELECT * FROM peeps;") | ||
result.map { |peeps| peeps['message'] } | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep indentation consistent
@@ -1,9 +1,26 @@ | |||
require 'sinatra/base' | |||
require './lib/messages' | |||
|
|||
class Chitter < Sinatra::Base | |||
get '/test' do | |||
'Test page' | |||
end | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice restful routes
This is a good clear solution with good naming and it clearly demonstrates the main learning objectives around reading from and writing to a DB. The next step would be to show the date on which a Peep was created. If you had more time, would you know how to get started? |
Your name
Please write your full name here to make it easier to find your pull request.
User stories
Please list which user stories you've implemented (delete the ones that don't apply).
README checklist
Does your README contains instructions for
Here is a pill that can help you write a great README!