git clone https://github.com/lsimmons2/url-shortener.git
cd url-shortener
pip install -r requirements.txt
- Make sure MySQL is running
source path/to/url-shortener/setup_db.sql;
inmysql
shell (or wherever you prefer to administer MySQL)python run.py
`curl -X POST -F 'url=https://facebook.com' http://localhost:5000/shorten`
The response will be:
The shortened URL http://localhost:5000/s/1 has been created from your original URL https://facebook.com.
Navigate to http://localhost:5000/s/1
and you will be redirected to https://facebook.com