Sha256: 4c03c1777ef824b0303914134aa2a93c9f3a3e2c6a8f4142d288745ef10b3a35
Contents?: true
Size: 676 Bytes
Versions: 1
Compression:
Stored size: 676 Bytes
Contents
require 'rubygems' require 'bundler' Bundler.setup lib_dir = File.join(File.dirname(__FILE__), 'lib') $LOAD_PATH.unshift(lib_dir) unless $LOAD_PATH.include?(lib_dir) require 'shorty/server' run Rack::Cascade.new([ # Redirect people to your real website if they hit the root of your URL shortening server Shorty::RootRedirect.new('http://www.polleverywhere.com/'), # A little UI where people can create urls at /new. Remove this to run headless or if you love curl. Shorty::UI.new, # The meat of the operations. You need this if you're going to shorten URLs Shorty::Core.new {|c| c.database_url = ENV['DATABASE_URL'] || "mysql://root@localhost/shorty" } ])
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shorty_server-0.5.0 | example.ru |