diff options
author | lonkaars <l.leblansch@gmail.com> | 2021-02-17 20:10:30 +0100 |
---|---|---|
committer | lonkaars <l.leblansch@gmail.com> | 2021-02-17 20:10:30 +0100 |
commit | c002fd2381d0c3d19f5f90bf589f9d50ef3b5316 (patch) | |
tree | afe9c460fea2964c61911c39409f9b9c17953d72 | |
parent | d914e781f0364de612a22313e3219e2cda635776 (diff) |
readme update
-rw-r--r-- | readme.md | 12 | ||||
-rw-r--r-- | readme_en.md | 10 |
2 files changed, 15 insertions, 7 deletions
@@ -85,7 +85,7 @@ Als je het goed gedaan hebt krijg je een nieuwe prompt te zien met `(venv)` er v ## Hoe starten -Om dit project te starten moet je 2 terminals gebruiken die afzonderlijk de flask server en de react server starten: +Om dit project te starten moet je 3 terminals gebruiken die afzonderlijk de flask server en de react server starten: ```sh # term 1 @@ -97,14 +97,18 @@ python3 api/main.py # term 2 yarn dev + +# term 3 + +sudo nginx -c $PWD/nginx.conf # dit werkt alleen op unix (ik moet nog ooit gaan testen op windows) ``` ## Hoe API endpoints testen ```sh # Als je alleen de flask server draait: -curl http://localhost:5000/api/<endpoint> +curl http://localhost:5000/<endpoint> -# Als de react server draait: -curl http://localhost:3000/api/<endpoint> +# Als nginx ook draait: +curl http://localhost:2080/api/<endpoint> ``` diff --git a/readme_en.md b/readme_en.md index 34bba27..c1f2315 100644 --- a/readme_en.md +++ b/readme_en.md @@ -99,14 +99,18 @@ python3 api/main.py # term 2 yarn dev + +# term 3 + +sudo nginx -c $PWD/nginx.conf # this only works on unix (i'm going to test on windows later) ``` ## How to test API endpoints ```sh # If you're running the standalone flask server: -curl http://localhost:5000/api/<endpoint> +curl http://localhost:5000/<endpoint> -# If you're running flask and react at the same time: -curl http://localhost:3000/api/<endpoint> +# If you're running flask and nginx at the same time: +curl http://localhost:2080/api/<endpoint> ``` |