Git Product home page Git Product logo

lilurl's Introduction

lilurl

About

This is a simple URL shortener written in ruby on Sinatra and using SQLite as the backend database.

Working example at http://krinkle.nom.co/lilurl

Dependencies:

Gems: sqlite3, sinatra, bundler

Usage

Development

To start the web server, run:

ruby lilurl.rb

To view the site, navigate to:

http://localhost:4567

or:

http://your.domain:4567

Production

Install apache and the passenger gem, install the passenger module in apache, and follow passenger's instructions to modify your apache configuration and create a virtual host.

API

lilurl can accept a POST request with parameter 'oldurl' and optional parameter 'postfix' and returns a JSON result.

lilurl's People

Contributors

cmurphy avatar jasonaowen avatar nibalizer avatar nickchappell avatar

Stargazers

John Binkley avatar Chance Snow avatar Joni Harker avatar  avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

lilurl's Issues

output should have http://

The output on success should have http:// at the beginning so that wherever this url goes it is easier for more programs to identify it as a web link

stats page

Can we have a stats page that shows how many links have been entered, maybe other cool things like links over time, etc.

Detecting duplicate links

It might be nice to search for previously added links to see if there already is an alias for a particular URL.

lilurl doesn't handle "bad" URLs

By that I am referring to URLs where there is leading or trailing whitespace, or where the user omitted the http://. In the later case it might still make sense to complain sense plenty of URLs we use are https anyway, but the former should be handled.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.