Skip to content

Commit

Permalink
chore: run development server with watchfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed Sep 16, 2024
1 parent 2349204 commit 42719e2
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 9 deletions.
97 changes: 96 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ types-python-dateutil = "^2.9.0.20240316"
types-regex = "^2024.7.24.20240726"
types-pyyaml = "^6.0.12.20240808"
python-dotenv = "^1.0.1"
watchfiles = '0.24.0'

[tool.black]
line-length = 100
Expand Down
9 changes: 1 addition & 8 deletions taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,8 @@ tasks:
- mypy .

server:
sources:
- .env
- '**/*.py'
- exclude: .venv/**/*
- '**/*.yaml'
generates:
- a-path-wont-exists
cmds:
- uvicorn server.app:app --env-file .env --no-access-log
- watchfiles -target-type=command --filter python 'uvicorn server.app:app --env-file .env --no-access-log' server

run:
dotenv: [ .env ]
Expand Down

0 comments on commit 42719e2

Please sign in to comment.