modal serve

Run a web endpoint(s) associated with a Modal stub and hot-reload code.

Examples:

modal serve hello_world.py

Usage:

modal serve [OPTIONS] STUB_REF

Arguments:

  • STUB_REF: Path to a Python file with a stub. [required]

Options:

  • --timeout FLOAT
  • --env TEXT: Environment to interact with.

If not specified, Modal will use the default environment of your current profile, or the MODAL_ENVIRONMENT variable. Otherwise, raises an error if the workspace has multiple environments.

  • --help: Show this message and exit.