Giter Site home page Giter Site logo

gourl's Introduction

GOURL

Simple URL Shortener Web Application. Demo is live at http://gourl.herokuapp.com

How to get

  • go get github.com/gayanch/gourl
  • Build
  • Copy 'static' & 'template' folders to 'bin' directory
  • Run

Usage

  • Goto src/github.com/gayanch/gourl/handler.go and change SITE_ADDRESS according to your domain name
  • Customize front-end by changing bin/template/home.html
  • Build & Run

Using API

  • Generate short URL

  • <host>/api?api=short&url=www.google.lk will return JSON output {response: <4 letter shortcode>}

  • Query short URL

  • <host>/api?api=long&url=<4 letter shortcode> will return JSON output {response: <long url>}

Notes

  • Normally app runs on localhost:8080 (set environment variable to override PORT=<port_no>)
  • Short URLs are stored in plain-text files, no databases

To-Do

  • Check whether particular long URL is already shortened before generating a new short URL
  • Drop Linux dependability
  • API functions
  • More customization options without editing source code
  • Improve front-end's look & feel
  • many more...

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.