Skip to content

Commit 40321ca

Browse files
committed
Enable hot reload for development server
1 parent 45319ae commit 40321ca

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ repos:
44
hooks:
55
# Run the linter.
66
- id: ruff
7-
args: [ ., --fix, --diff ]
7+
entry: ruff check . --fix
88
# Run the formatter.
99
- id: ruff-format
1010
args: [ . ]

src/server.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ async def run_subprocess():
7979

8080

8181
if __name__ == "__main__":
82-
app.run(host="0.0.0.0", port=env.PORT)
82+
app.run(host="0.0.0.0", port=env.PORT, debug=env.DEBUG)

src/settings.py

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class ServerSettings(CommonSettings):
2828
IP_ADDRESS: Union[IPvAnyAddress | Literal["localhost"]] = Field(
2929
default="localhost"
3030
)
31+
DEBUG: bool = Field(default=True)
3132

3233

3334
class EmailSettings(ServerSettings):

0 commit comments

Comments
 (0)