Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable hot reload for development server #36

Merged
merged 1 commit into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repos:
hooks:
# Run the linter.
- id: ruff
args: [ ., --fix, --diff ]
entry: ruff check . --fix
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the --diff option because it was difficult to understand the content of the ruff error without displaying it!

# Run the formatter.
- id: ruff-format
args: [ . ]
2 changes: 1 addition & 1 deletion src/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ async def run_subprocess():


if __name__ == "__main__":
app.run(host="0.0.0.0", port=env.PORT)
app.run(host="0.0.0.0", port=env.PORT, debug=env.DEBUG)
1 change: 1 addition & 0 deletions src/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class ServerSettings(CommonSettings):
IP_ADDRESS: Union[IPvAnyAddress | Literal["localhost"]] = Field(
default="localhost"
)
DEBUG: bool = Field(default=True)


class EmailSettings(ServerSettings):
Expand Down
Loading