Code Monkey home page Code Monkey logo

url_shortener's Introduction

URL Shortener

This repository consists of a URL shortener application.

It is a REST API based application which converts long URL to short URL. It also returns a corresponding long URL for previously converted short URL. Redirection to the original URL is also handled when opening the short URL on browser.

PS.: the application is not SSL-certified.

API specifications:

POST http://0.0.0.0:8080/short_url

Request payload:
{
	'url': 'http://google.com/'
}

Response:
{
	'message': 'Converted the long URL to a short URL',
	'outcome': 'success',
	'url': 'http://localhost:8080/3zELeF6'
}
GET http://0.0.0.0:8080/long_url

Request payload:
{
	'url': 'http://localhost:8080/3zELeF6'
}

Response:
{
	'message': 'Fetched long URL using given short URL ',
	'outcome': 'success',
	'url': 'http://google.com/'
}

Pre-built image on docker hub: https://hub.docker.com/repository/docker/shlokc/url_shortener_application

Command to run the image as container:

docker run -d --restart=always \
	-p 0.0.0.0:8080:5000 \
	--name url_shortener \
	-v /url_shortener_data:/app/data \
	-v /url_shortener_logs:/app/logs \
	shlokc/url_shortener_application:1.2

Thank you :)

url_shortener's People

Contributors

shlok-dev avatar shlokc9 avatar

Watchers

 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.