I run through the challenge:
https://www.loom.com/share/cce3b705f9b24089bb8dea94187a12ed
To run the project using Docker:
-
Clone the repository:
git clone https://github.com/janvi-kalra/loadtester.git cd loadtester
-
Build and start the Docker containers:
docker-compose up --build
-
Access the services:
- The backend will be accessible at
http://localhost:8000
- The frontend will be accessible at
http://localhost:3000
- The backend swagger docs will be accessible at
http://localhost:8000/docs
- The backend will be accessible at
I've tested on Docker and it WAI. It should look something like:
If you prefer to run the project locally without Docker, follow these steps:
-
Navigate to the backend directory:
cd backend
-
Create a virtual environment:
python -m venv env
-
Activate the virtual environment:
- On Windows:
.\env\Scripts\activate
- On macOS/Linux:
source env/bin/activate
- On Windows:
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the FastAPI server:
uvicorn main:app --reload
The backend server will start on
http://127.0.0.1:8000
.
-
Navigate to the frontend directory:
cd ../frontend
-
Install the required dependencies:
npm install
-
Run the frontend development server:
npm start
The frontend server will start on
http://localhost:3000
.
- Ensure the virtual environment is activated.
- Navigate to the backend directory:
cd backend
- Run the tests:
pytest