kopia lustrzana https://github.com/simonw/datasette
--reload now also reloads if databases change on disk
rodzic
48d24c6589
commit
eac08f0dfc
|
|
@ -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: *"
|
||||
|
|
@ -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])
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue