TP2 Api
TP2 Api
• User: #firstname
• Password: #Password sent by email
• IP : #IP sent by email
cd /opt
cd tp2
source /etc/environment
1.5 GET THE SOURCE CODE OF MRIT-TP2
a) From /opt/tp2, perform a git clone
cd mrit-tp2
cd backend
2 BACKEND UPDATE
python3 app.py
http://#IP:8080/movies
• Verify that the movie has been added to the list (GET)
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET
http://localhost:8080/movies
Get the movie’s ID you have created. You will use this ID to update the note
3 MANIPULATION BACKEND
1 – Create a new entry with one of your favorite movie with a rate under 10 (You will update it in the
next step)
2 – Once the entry has been added, update the rate with a value above 10
3 – Create a second entry with one of your most disliked movie with a rate under 10
4 – Delete the movie “snatch” which has been created in the part “Backend Update”
5 – TO TO PROVIDE (Report) - Take a screenshot of your browser with the URL (IP) - include it in
your report
We will keep the backend running (python3 app.py) and launch a new terminal (Putty) to launch the
frontend. Perform these actions with a new terminal :
cd /tmp
chmod +x nodesource_setup.sh
sudo ./nodesource_setup.sh
cd /opt/tp2/mrit-tp2/frontend
yarn install