createPublicServerManifest
función
Quita del manifiesto descubierto del servidor las rutas privadas de los handlers, para poder serializarlo y enviarlo al navegador.
ts
import { createPublicServerManifest } from "@meekojs/meeko/framework";Source code src/shared/clients.ts:84
Firma #
ts
function createPublicServerManifest(manifest: PublicServerManifest): PublicServerManifestParameters #
-
manifestPublicServerManifest Manifiesto con, como mínimo, los campos públicos de cada endpoint.
Returns #
-
PublicServerManifest Un manifiesto nuevo con sólo
clientKey,pathname,method,contentType,id.
Example #
ts
import { discoverServerManifest } from "@meekojs/meeko/build";
import { createPublicServerManifest } from "@meekojs/meeko/framework";
const manifest = await discoverServerManifest(process.cwd());
const json = JSON.stringify(createPublicServerManifest(manifest));