Last active
November 6, 2016 05:12
-
-
Save picatz/e8ff0254970efd70337208449fa8ff6f to your computer and use it in GitHub Desktop.
An simple sinatra application to act as a demo for my lsof and fosl examples.
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
require 'sinatra' | |
require 'json' | |
set :port, 80 | |
get '/time' do | |
content_type :json | |
{ :time => Time.now }.to_json | |
# => {"time":"2016-11-06 01:11:42 -0400"} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment