-
-
Save ShopifyEng/2f2479a18ba2cbb6a710ff8fd100d27e to your computer and use it in GitHub Desktop.
How to Build a Web App with and without Rails Libraries
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
#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