simple api to post and get your code from server just like pastebin,but api only
The api hosted at : https://pastebincloneapi.pythonanywhere.com/api/v1/paste
- Get all code
api/v1/paste
: return all codes - Get code by unique_id
GET api/v1/paste/:unique_id
: return a code select by unique id,you will get unique id when add code - Add new code
POST api/v1/paste
: return a unique id of added code if success
- git clone this repository
git clone https://github.com/AlphaBeta1906/pastebin_api_clone/
- make and activate virtualenv
virtualenv venv . venv/bin/activate
- Install dependency
pip install requirements.txt
- Migrate database(delete
migrations
folder first)# connect your database in config.py file flask db init flask db migrate flask db upgrade
- Run server
python app.py