Skip to content
Meeko
Type to search the guides and the API reference. Open it from any page with / or Ctrl K; move with the arrow keys and open a result with Enter.
Get started

Contents

On this page

Not translated yet

This page has not been translated into English yet, so it is shown in Spanish.

createServerClientOptions

función

Opciones de cliente para el servidor: leen la URL, las cookies, authorization, el token CSRF y el despacho local de la petición en curso en cada llamada, así que un cliente creado a nivel de módulo nunca retiene credenciales de otro usuario. Es lo que usan los clientes api y rpc generados para SSR.

ts
import { createServerClientOptions } from "@meekojs/meeko/server";

Source code src/server/runtime/auto-clients.ts:21

Firma #

ts
function createServerClientOptions(): ClientOptions

Returns #

ClientOptions

Opciones dinámicas ligadas a la petición activa.

Throws #

Error

Desde cada llamada del cliente, fuera de una petición de Meeko.

Example #

ts
import { createApiClient } from "@meekojs/meeko/framework";
import { createServerClientOptions } from "@meekojs/meeko/server";

export const api = createApiClient<ApiContract>(manifest, createServerClientOptions());

See also #

Was this page helpful?

Add a comment

It is sent when you choose “Yes” or “No”. Only the page, your answer and the comment are stored: no cookies and no personal data.

0 of 2000 characters

Edit on GitHub: packages/meeko/src/server/runtime/auto-clients.ts