Skip to content

Commit

Permalink
--reload now also reloads if databases change on disk
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Dec 20, 2018
1 parent 48d24c6 commit eac08f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion datasette/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def package(
@click.option(
"--reload",
is_flag=True,
help="Automatically reload if code change detected - useful for development",
help="Automatically reload if database or code change detected - useful for development",
)
@click.option(
"--cors", is_flag=True, help="Enable CORS by serving Access-Control-Allow-Origin: *"
Expand Down Expand Up @@ -345,6 +345,7 @@ def serve(
import hupper

reloader = hupper.start_reloader("datasette.cli.serve")
reloader.watch_files(files)
if metadata:
reloader.watch_files([metadata.name])

Expand Down
4 changes: 2 additions & 2 deletions docs/datasette-serve-help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Options:
-h, --host TEXT host for server, defaults to 127.0.0.1
-p, --port INTEGER port for server, defaults to 8001
--debug Enable debug mode - useful for development
--reload Automatically reload if code change detected - useful for
development
--reload Automatically reload if database or code change detected -
useful for development
--cors Enable CORS by serving Access-Control-Allow-Origin: *
--load-extension PATH Path to a SQLite extension to load
--inspect-file TEXT Path to JSON file created using "datasette inspect"
Expand Down

0 comments on commit eac08f0

Please sign in to comment.