Created
November 25, 2015 12:15
-
-
Save jspc/f26f791759bfa89338fa to your computer and use it in GitHub Desktop.
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
#!/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