Skip to content

Instantly share code, notes, and snippets.

@jspc
Created November 25, 2015 12:15
Show Gist options
  • Save jspc/f26f791759bfa89338fa to your computer and use it in GitHub Desktop.
Save jspc/f26f791759bfa89338fa to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# Installation: 'gem install sinatra'
# Running: ruby hello_world.rb
# Using: The app will give you a port. Visit it.
require 'json'
require 'sinatra'
get '/' do
content_type :json
{id: 1, content: 'Hi!'}.to_json
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment