I made a frontend/backend for the project and put them into two separate directories. Since we wanted to do a backend in Python, I needed to bring in Flask to communicate with the frontend via JSON. In the main.py, I put in a temporary api that just returns an array of our names so I could test it.
To Test
you need to have two terminals open, one in the backend, one in the frontend.
Backend: run these two commands source venv/bin/activatepython main.py
Frontend: run these two commands npm installnpm run dev
Then if you open the terminal at http://localhost:5173/, you should see the array of names pop up twice.
I made a frontend/backend for the project and put them into two separate directories. Since we wanted to do a backend in Python, I needed to bring in Flask to communicate with the frontend via JSON. In the
main.py
, I put in a temporary api that just returns an array of our names so I could test it.To Test
you need to have two terminals open, one in the backend, one in the frontend.
Backend: run these two commands
source venv/bin/activate
python main.py
Frontend: run these two commands
npm install
npm run dev
Then if you open the terminal at
http://localhost:5173/
, you should see the array of names pop up twice.