Skip to content

rafnixg/shorten-url-flask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URL Shortener in Flask

Web service using Flask framework for Shortener URLs

Install

Create Virtual env

$ python3 -m venv env

Install requirements.txt

$ source env/bin/activate
$ pip install -r requirements.txt

Initializate the DB

$ flask shell
>>> from app import db
>>> db.create_all()
>>> exit()

Run

$ flask run

Testing using CURL

Create new link

$ curl --header "Content-Type: application/json" --request POST --data '{"url":"http://github.com/"}' http://localhost:5000/

Get all links

$ curl --header "Content-Type: application/json" --request GET http://localhost:5000/

About

Webservice using Flask framewrok for Shortener URL

Topics

Resources

License

Stars

Watchers

Forks

Languages