The backend can be started by going into the directory workshop-food-facts/backend and starting python backend.py (or python3 backend.py). It should start on localhost:5000.
However, the nextJS app has a route rewrite for that. So after starting the backend, you can start the NextJS app npm run dev in the workshop-food-facts/ directory and you should be able to visit localhost:3000/playground (<-- Note: NextJS webserver will do a route rewrite) and view the backend graphql Playground..
One of the first tasks would be to check how grapqhl works. Just look on YT, there are many tutorials. Then write queries in the playground to get some data. You should be able to view the schema (there is a schema button on the right side of the playground). Build some queries and get familiar with grapqhql queries. Let me know if you need help
After you feel comfortable, you can move on integrating it in React. (I will then add instructions)
Hi,
if you want to learn how to use grapghql, this project provides a grapqhl backend (sadly in python).
To install dependencies for the backend you will have to install python as well as
flask
andariadne
.pip install flask
pip install ariadne
The backend can be started by going into the directory
workshop-food-facts/backend
and startingpython backend.py
(orpython3 backend.py
). It should start onlocalhost:5000
.However, the nextJS app has a route rewrite for that. So after starting the backend, you can start the NextJS app
npm run dev
in theworkshop-food-facts/
directory and you should be able to visitlocalhost:3000/playground
(<-- Note: NextJS webserver will do a route rewrite) and view the backend graphql Playground..One of the first tasks would be to check how grapqhl works. Just look on YT, there are many tutorials. Then write queries in the playground to get some data. You should be able to view the schema (there is a schema button on the right side of the playground). Build some queries and get familiar with grapqhql queries. Let me know if you need help
After you feel comfortable, you can move on integrating it in React. (I will then add instructions)