Skip to content

Commit b54bd46

Browse files
committed
Update make file and read of basic sample
1 parent ffbf8ce commit b54bd46

File tree

2 files changed

+24
-20
lines changed

2 files changed

+24
-20
lines changed

create_fastapi_project/templates/basic/Makefile

+8-9
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@ help:
3030
@echo " Lint code with ruff and try to fix."
3131

3232
install:
33-
cd app && \
34-
poetry shell && \
35-
poetry install
33+
cd app && poetry install && cd ..
3634

3735
run-app:
38-
poetry run uvicorn app.main:app --host 0.0.0.0 --port 8000
36+
cd app && poetry run uvicorn app.main:app --host 0.0.0.0 --port 8000 && cd ..
37+
3938

4039
run-dev-build:
4140
docker compose -f docker-compose-dev.yml up --build
@@ -53,21 +52,21 @@ stop-prod:
5352
docker compose down
5453

5554
formatter:
56-
cd backend/app && \
55+
cd app && \
5756
poetry run black app
5857

5958
mypy:
60-
cd backend/app && \
59+
cd app && \
6160
poetry run mypy .
6261

6362
lint:
64-
cd backend/app && \
63+
cd app && \
6564
poetry run ruff app && poetry run black --check app
6665

6766
lint-watch:
68-
cd backend/app && \
67+
cd app && \
6968
poetry run ruff app --watch
7069

7170
lint-fix:
72-
cd backend/app && \
71+
cd app && \
7372
poetry run ruff app --fix

create_fastapi_project/templates/basic/README.md

+16-11
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,33 @@ This is a FastAPI project initialized using [`create-fastapi-project`](https://g
66

77
The commands in this documentation can be customized on the **Makefile**. It can be started with and without docker.
88

9-
First, make sure you have all packages installed:
10-
11-
```bash
12-
make install
13-
```
149

10+
- Run the server (Recommended using docker):
1511

16-
Run the server:
1712
```bash
18-
# Run locally without docker
19-
make run-app
20-
# or
2113
# Run locally with docker in dev mode and force build
2214
make run-dev-build
2315
# or
2416
# Run locally with docker in dev mode
25-
make run-dev-build
17+
make run-dev
2618
# or
27-
# Run locally with docker in prod mode
19+
# Run locally with docker in prod mode (Autorelod disabled)
2820
make run-prod
2921
```
3022

23+
24+
- Run the server without docker:
25+
26+
First, make sure you have all packages installed:
27+
28+
```bash
29+
make install
30+
```
31+
32+
```bash
33+
make run-app
34+
```
35+
3136
Open [http://localhost:8000/docs](http://localhost:8000/docs) with your browser to see the result.
3237

3338
You can start editing the server by modifying `app/main.py`.

0 commit comments

Comments
 (0)