This is a simple full-stack web application composed of a backend and a frontend. It utilizes Flask for the backend API and ReactJS for the frontend interface.
Open a Terminal, the launch the following commands:
git clone https://github.com/francescodelduchetto/CMP9134-2425-basicWebApp
-
Make sure that Docker is running on your computer.
-
Open VS Code.
-
Click on the blue icon in the bottom left corner of the visual studio window
-
Select "Reopen in Container..."
-
Locate the folder
CMP9134-2425-basicWebApp
, select it and click Open -
Wait until the setup is complete.
Your application should now be running and accessible at http://localhost:5173/
❗If you plan to work with this template on your personal computer, you need the following installation steps as prerequisite
- Make sure you have Docker installed: https://docs.docker.com/engine/install/
- Make sure you have VSCode installed: https://code.visualstudio.com/download
- Make sure you have git installed: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
- Make sure you have the
Docker
and theDev Containers
extension in VSCode installed and working: https://code.visualstudio.com/docs/containers/overview and https://code.visualstudio.com/docs/devcontainers/containers- ensure docker is working, i.e. try
docker run --rm hello-world
and check it succeeds for your user
- ensure docker is working, i.e. try
❗ The following commands needs to be launched from terminals inside VSCode (click Terminal > New Terminal).
- Install Python package requirements:
pip install -r requirements.txt
- Install NodeJs and its requirements:
curl -sL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh && sudo apt install -y nodejs
cd frontend
npm install
Open a new VSCode Terminal and launch the following commands.
cd ../backend
python main.py
On a different terminal, launch:
cd frontend
npm run dev
This will start the development server for the frontend, usually accessible at http://localhost:5173/.
Adapted from: https://github.com/Pakheria/Basic-Web-Application