LinkList/backend
Yueran Zhang 9efdb8fdbf Add an endpoint to update links in DB 2021-03-29 15:48:22 -04:00
..
.keep Create an empty backend directory 2021-03-03 23:01:45 -05:00
README.md newline 2021-03-04 11:19:22 -05:00
data.json Add an endpoint to update links in DB 2021-03-29 15:48:22 -04:00
main.py Add an endpoint to update links in DB 2021-03-29 15:48:22 -04:00
requirements.txt Add an endpoint to update links in DB 2021-03-29 15:48:22 -04:00
setup_db.py Adds python file to setup database 2021-03-11 07:20:20 -05:00

README.md

Links Backend

Setup

  1. Install Python 3.

  2. Run the following commands inside the backend folder:

python3 -m venv venv
venv/Scripts/activate
pip install -r requirements.txt
python main.py

If you are on Windows, run venv\Scripts\activate instead, for the second command.

  1. Go to localhost:5000 in your web browser and you should see "Hello, World!".

(Optional) Exercises

  • Install Postman (https://www.postman.com/downloads/) and use it make a request to this web server.
  • Add a new GET route at /test that shows "A new route".
  • Add a new POST route at /post that accepts a JSON body, and shows the foo key of the JSON.