/root
├── /backend
└── /frontend
Follow these steps to set up and run the project:
-
Navigate to the
backend
directory:cd backend
-
Install backend dependencies:
npm install
-
Build the backend:
npm run build
-
Start the backend server:
npm run backend
The backend server will start on its configured port (e.g.,
http://localhost:3000
). -
Open a new terminal window/tab and navigate to the
frontend
directory:cd frontend
-
Install frontend dependencies:
npm install
-
Start the frontend development server:
npm run dev
The frontend development server will start on its configured port (e.g.,
http://localhost:5173
).
-
/backend
: Contains the backend server code./models
: Mongoose models for MongoDB./routes
: Express routes./controllers
: Request handlers.index.ts
: Main server file.
-
/frontend
: Contains the frontend code./components
: React components.index.tsx
: Main entry point for the React application.
- Ensure that both backend and frontend servers are running on different ports to avoid conflicts.
- Check console output for any errors during the build or runtime and resolve them as needed.