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

docs: Update server index.mdx verbiage and phrasing #6189

Merged
merged 1 commit into from
Apr 30, 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
5 changes: 3 additions & 2 deletions packages/docs/src/routes/docs/(qwikcity)/server$/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ contributors:
- mjschwanitz
- wtlin1228
- adamdbradley
- jemsco
updated_at: '2023-10-03T18:53:23Z'
created_at: '2023-03-29T02:35:29Z'
---
Expand All @@ -26,7 +27,7 @@ Your new function will have the following signature:
`([AbortSignal, ] ...): Promise<T>`

`AbortSignal` is optional, and allows you to cancel a long running request by terminating the connection.
Please note that depending on your server runtime, the function on the server may or may not terminate immediately as it depends on how client disconnections are handled by said runtime.
Please note that depending on your server runtime, the function on the server may not terminate immediately. It depends on how client disconnections are handled by the runtime.

```tsx
import { component$, useSignal } from '@builder.io/qwik';
Expand Down Expand Up @@ -89,7 +90,7 @@ const addUser = server$(async function(id: number, fullName: string, address: Ad
> Server$ can accept any number of arguments and return any value that can be serialized by Qwik, that includes primitives, objects, arrays, bigint, JSX nodes and even Promises, just to name a few.


## Streaming responses
## Streaming Responses

`server$` can return a stream of data by using an async generator. This is useful for streaming data from the server to the client.

Expand Down
Loading