continue-custom/server/continuedev/__main__.py
Nate Sesti 279593a848
Strong typing (#533)
* refactor: ♻️ get rid of continuedev.src.continuedev structure

* refactor: ♻️ switching back to server folder

* feat: ✨ make config.py imports shorter

* feat: 🔖 publish as pre-release vscode extension

* refactor: ♻️ refactor and add more completion params to ui

* build: 🏗️ download from preview S3
2023-10-04 23:47:59 -07:00

30 lines
737 B
Python

from typing import Optional
import typer
from . import run
from .server.main import run_server
app = typer.Typer()
@app.command()
def main(
port: int = typer.Option(65432, help="server port"),
host: str = typer.Option("127.0.0.1", help="server host"),
meilisearch_url: Optional[str] = typer.Option(
None, help="The URL of the MeiliSearch server if running manually"
),
config: Optional[str] = typer.Option(
None, help="The path to the configuration file"
),
headless: bool = typer.Option(False, help="Run in headless mode"),
):
if headless:
run(config)
else:
run_server(port=port, host=host, meilisearch_url=meilisearch_url)
if __name__ == "__main__":
app()