mr-nsin / url_shortner

Flask microframework based URL shortner Rest API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

url_shortener

URL Shortener Service on Flask Framework.

Pipenv Installation

$ pip install pipenv

Steps to run locally

Step 1: Clone the repo

$ git clone https://github.com/mr-nsin/url_shortner.git

Step 2: Install libraries using pipenv

$ pipenv install

Step 3: Run the app

$ python3 app.py

Usage

Test the app using postman by invoking below endpoint.

http://localhost:105/?original_url=https://google.com
Response:
{

	"date_created": "07-22-2021",

	"original_url": "https://google.com",

	"short_url": "http://localhost:105/Lnj",

	"visits": 1

}
Run the below endpoint in browser of above output
http://localhost:105/Lnj

About

Flask microframework based URL shortner Rest API


Languages

Language:Python 92.4%Language:Dockerfile 7.6%