Skip to content

Instantly share code, notes, and snippets.

@petejohanson
Created December 1, 2011 23:53
Show Gist options
  • Save petejohanson/1420800 to your computer and use it in GitHub Desktop.
Save petejohanson/1420800 to your computer and use it in GitHub Desktop.
Simple Sinatra RESTful Service
require 'json'
require 'sinatra'
chief_complaints = [
{ name: "Dizziness" },
{ name: "Chest Pain" },
]
before /.*/ do
content_type :json
end
get '/chief_complaints' do
chief_complaints.to_json
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment