Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ShopifyEng
Last active March 26, 2021 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShopifyEng/2f2479a18ba2cbb6a710ff8fd100d27e to your computer and use it in GitHub Desktop.
Save ShopifyEng/2f2479a18ba2cbb6a710ff8fd100d27e to your computer and use it in GitHub Desktop.
How to Build a Web App with and without Rails Libraries
#Create a Case Statement for all the Endpoints
case [method_token, target]
when ["GET", "/show/birthdays"]
# Endpoint for GET /show/birthdays
when ["POST", "/add/birthday"]
# Endpoint for POST /add/birthday
else
response_status_code="200 OK"
response_message= "✅Received a #{method_token} request to #{target} with #{version_number}"
content_type ="text/plain"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment