Skip to content

Live reload for aio.http with --debug #397

@thomasuster

Description

@thomasuster
import functions_framework.aio
from starlette.requests import Request
from starlette.responses import Response
@functions_framework.aio.http
async def main(request: Request) -> Response:
  print("Hello world")
  return Response(status_code=200)
  1. run functions-framework --target=main --debug
  2. Edit print("Hello world") -> print("I've updated")

Expected: Should reload the application
Result: Does nothing

Seems like StarletteApplication probably needs something like self.options.reload = debug?

CC @taeold

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions