Giter VIP home page Giter VIP logo

combourl's Introduction

ComboURL

↑ ↑ ↓ ↓ ← → ← → B A Start

ComboURL is a short exercise in writing an URL shortener. It's built on top of Flask, which is the only requirement for the project.

Currently there's no persistent storage, the in-memory database is not thread safe so take this into account when running ComboURL :).

The created URLs are of the format http://swag-host.com/up-up-down-down.

API

POST /shorten

Parameters: link should contain the link to shorten

Returns: a combo for the shortened link in text/plain format.

GET /{combo}

Returns:

  • 301 if a link matching combo is found, redirects to the link
  • 404 error if no link matches combo

Running ComboURL

Installing Flask and Gunicorn

pip install Flask
pip install gunicorn

Running the service in port 5000

cd ComboURL/
gunicorn -b 127.0.0.1:5000 main:app

combourl's People

Contributors

weeezes avatar

Watchers

 avatar  avatar

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.