Install npm in frontend folder Run the server and run npm Here is a step-by-step guide to accomplish the tasks: Backend: Create Virtual Environment and Install Dependencies Navigate to the backend directory in your terminal. Create a virtual environment using: For Windows: python -m venv venv For macOS/Linux: python3 -m venv venv Activate the virtual environment: Windows: venv\Scripts\activate macOS/Linux: source venv/bin/activate Install all dependencies listed in requirements.txt : pip install -r requirements.txt Frontend: Install npm Navigate to your frontend folder. npm install to install all dependencies from Run the command npm packages locally in the folder). Running Server and Frontend package.json (this installs To run your backend server, use the command relevant to your backend (e.g., for FastAPI uvicorn main:app --reload , or whatever fits your framework). To start the frontend development server, run: npm start This typically runs the script defined in package.json under "start" or "dev".
Optional: Running Backend and Frontend Together If you want to run both simultaneously in the same terminal, you can use the concurrently npm package:
Install it in frontend or root folder: npm install concurrently --save-dev
Add a script in package.json scripts section like: "scripts": { "dev": "concurrently "cd backend && uvicorn main:app --reload" "cd frontend && n } Run both with npm run dev This will start both backend and frontend servers simultaneously. If you want, I can provide exact commands for your specific backend framework and frontend setup. Let me know if you need that. This covers creating and activating the backend virtual environment, installing backend and frontend packages, and running both servers.