Skip to content

Instantly share code, notes, and snippets.

@neetso
neetso / tinyurl.rb
Created November 26, 2016 09:37 — forked from woods/tinyurl.rb
A complete URL-shortening web application, written in Ruby/Sinatra.
#!/usr/bin/env ruby
#
# A complete URL-shortening web application, written in Ruby/Sinatra. Run it
# from the command line, and then visit http://localhost:4567/
#
# Or to run it under apache/passenger, you'll need a config.ru file with the
# following contents:
#
# require 'tinyurl'
# run Sinatra::Application