mirror of
https://github.com/enzet/map-machine.git
synced 2025-08-03 16:49:10 +02:00
Merge 90bb5b0897
into 825eb34191
This commit is contained in:
commit
4210a549fa
2 changed files with 7 additions and 0 deletions
|
@ -74,6 +74,7 @@ def run_server(options: argparse.Namespace) -> None:
|
|||
try:
|
||||
handler = TileServerHandler
|
||||
handler.cache = Path(options.cache)
|
||||
handler.update_cache = options.update_cache
|
||||
handler.options = options
|
||||
server = HTTPServer(("", options.port), handler)
|
||||
logging.info(f"Server started on port {options.port}.")
|
||||
|
|
|
@ -270,6 +270,12 @@ def add_server_arguments(parser: argparse.ArgumentParser) -> None:
|
|||
default="cache",
|
||||
metavar="<path>",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--update-cache",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
default=True,
|
||||
help="allow writing to cache",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--port",
|
||||
help="port number",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue