Skip to content

Instantly share code, notes, and snippets.

View patrickwhardy's full-sized avatar

Patrick Hardy patrickwhardy

  • Slack
  • Boulder, CO
View GitHub Profile

Introduction to Sinatra

1. What is the purpose of the server file (routing)?

###The server file contains http verbs that dictate how a page is rendered, what logic is executed and what will be sent back to the client.

2. How do you pass variables into the views?

###Pass a var to the server file. The server file uses ERB to translate a designated file in the views dir.