File tree 2 files changed +24
-20
lines changed
create_fastapi_project/templates/basic
2 files changed +24
-20
lines changed Original file line number Diff line number Diff line change @@ -30,12 +30,11 @@ help:
30
30
@echo " Lint code with ruff and try to fix."
31
31
32
32
install :
33
- cd app && \
34
- poetry shell && \
35
- poetry install
33
+ cd app && poetry install && cd ..
36
34
37
35
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
+
39
38
40
39
run-dev-build :
41
40
docker compose -f docker-compose-dev.yml up --build
@@ -53,21 +52,21 @@ stop-prod:
53
52
docker compose down
54
53
55
54
formatter :
56
- cd backend/ app && \
55
+ cd app && \
57
56
poetry run black app
58
57
59
58
mypy :
60
- cd backend/ app && \
59
+ cd app && \
61
60
poetry run mypy .
62
61
63
62
lint :
64
- cd backend/ app && \
63
+ cd app && \
65
64
poetry run ruff app && poetry run black --check app
66
65
67
66
lint-watch :
68
- cd backend/ app && \
67
+ cd app && \
69
68
poetry run ruff app --watch
70
69
71
70
lint-fix :
72
- cd backend/ app && \
71
+ cd app && \
73
72
poetry run ruff app --fix
Original file line number Diff line number Diff line change @@ -6,28 +6,33 @@ This is a FastAPI project initialized using [`create-fastapi-project`](https://g
6
6
7
7
The commands in this documentation can be customized on the ** Makefile** . It can be started with and without docker.
8
8
9
- First, make sure you have all packages installed:
10
-
11
- ``` bash
12
- make install
13
- ```
14
9
10
+ - Run the server (Recommended using docker):
15
11
16
- Run the server:
17
12
``` bash
18
- # Run locally without docker
19
- make run-app
20
- # or
21
13
# Run locally with docker in dev mode and force build
22
14
make run-dev-build
23
15
# or
24
16
# Run locally with docker in dev mode
25
- make run-dev-build
17
+ make run-dev
26
18
# or
27
- # Run locally with docker in prod mode
19
+ # Run locally with docker in prod mode (Autorelod disabled)
28
20
make run-prod
29
21
```
30
22
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
+
31
36
Open [ http://localhost:8000/docs ] ( http://localhost:8000/docs ) with your browser to see the result.
32
37
33
38
You can start editing the server by modifying ` app/main.py ` .
You can’t perform that action at this time.
0 commit comments