- Build a simple Sinatra app with GET and POST
- You will be building a calculator once again, but this time it will work with the internet.
- You should make git commits as you finish each phase, so you can see the history.
####Specification:
- When they visit the homepage (GET) (
/), a user should see some text to welcome them to the calculator - When they visit the
/calculationspage (GET), a user should be able to see all of the calculations that have been done in the past - A user can see a the third calculation they've done in the past by visiting
/calculations/3(GET). Same with any other number. If the calculation doesn't exist, they should see text saying that the id wasn't found. - A user can POST an Addition calculation to
/calculations/addby providing 2 numbers as parameters.- Use the POSTman Chrome extension to try out your POST
- Same with
/calculations/subtract,/calculations/multiply, and/calculations/divide - The calculator can add, subtract, multiply and divide.
- Translate one line of your MTA app to Sinatra
- Example: When I visit
/mta/times_square/union_squareusing a GET, I should see "Your trip length from Times Square to Union Square is 4 stops." in the browser.
- Example: When I visit