Start DataKit server and open in browser
(port: Optional[int], host: str)
| 93 | @click.option("--port", "-p", type=int, help="Port number") |
| 94 | @click.option("--host", "-h", default="127.0.0.1", help="Host address") |
| 95 | def open(port: Optional[int], host: str): |
| 96 | """Start DataKit server and open in browser""" |
| 97 | if port is None: |
| 98 | port = find_free_port() |
| 99 | |
| 100 | from click.testing import CliRunner |
| 101 | runner = CliRunner() |
| 102 | runner.invoke(serve, ["--port", str(port), "--host", host]) |
| 103 | |
| 104 | |
| 105 | @main.command() |
no test coverage detected