Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: asgi docs #1828

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions docs/docs/en/getting-started/asgi.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,6 @@ app = AsgiFastStream(
)
```

Or you can write the **ASGI** endpoint yourself:

```python
async def liveness_ping(scope, receive, send):
return AsgiResponse(b"", status_code=200)
```

!!! tip
You do not need to setup all routes using the `asgi_routes=[]` parameter.<br/>
You can use the `#!python app.mount("/healh", asgi_endpoint)` method also.
Expand Down Expand Up @@ -125,7 +118,8 @@ from faststream.asgi import make_ping_asgi, AsgiResponse

broker = NatsBroker()

async def liveness_ping(scope, receive, send):
@get
async def liveness_ping(scope):
return AsgiResponse(b"", status_code=200)

app = FastStream(broker).as_asgi(
Expand Down
Loading