Skip to content

Commit 0c0cedb

Browse files
committed
instruction on how to run locally
1 parent 4ad6f2a commit 0c0cedb

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,32 @@ It generates QR Codes for the provided URL, the front-end is in NextJS and the A
99

1010
**API**: API that receives URLs and generates QR codes. The API stores the QR codes in cloud storage(AWS S3 Bucket).
1111

12+
## Running locally
13+
14+
### API
15+
16+
The API code exists in the `api` directory. You can run the API server locally:
17+
18+
- Clone this repo
19+
- Make sure you are in the `api` directory
20+
- Create a virtualenv by typing in the following command: `python -m venv .venv`
21+
- Install the required packages: `pip install -r requirements.txt`
22+
- Create a `.env` file, and add you AWS Access and Secret key, check `.env.example`
23+
- Also, change the BUCKET_NAME to your S3 bucket name in `main.py`
24+
- Run the API server: `uvicorn main:app --reload`
25+
- Your API Server should be running on port `http://localhost:8000`
26+
27+
### Front-end
28+
29+
The front-end code exits in the `front-end-nextjs` directory. You can run the front-end server locally:
30+
31+
- Clone this repo
32+
- Make sure you are in the `front-end-nextjs` directory
33+
- Install the dependencies: `npm install`
34+
- Run the NextJS Server: `npm run dev`
35+
- Your Front-end Server should be running on `http://localhost:3000`
36+
37+
1238
## Goal
1339

1440
The goal is to get hands-on with DevOps practices like Containerization, CICD and monitoring.

0 commit comments

Comments
 (0)