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.

composeFrameworkRoutes

función

Compone las rutas del proyecto, de sus layers y de módulos programáticos en un manifiesto. Cualquier colisión de URL es un error: ninguna fuente sustituye en silencio a la aplicación, a un layer o a otro módulo.

ts
import { composeFrameworkRoutes } from "@meekojs/meeko/build";

Source code src/framework/modules.ts:94

Firma #

ts
function composeFrameworkRoutes(options: ComposeRoutesOptions): Promise<readonly RouteRecord[]>

Parameters #

options ComposeRoutesOptions

Proyecto, layers y módulos.

Returns #

Promise<readonly RouteRecord[]>

El manifiesto de rutas ordenado.

Throws #

Error

Si un nombre es inválido o se repite, una carpeta se repite o dos rutas colisionan.

Example #

ts
import { composeFrameworkRoutes } from "@meekojs/meeko/build";

const routes = await composeFrameworkRoutes({
  projectRoot: process.cwd(),
  layers: [{ name: "base", root: "layers/base" }],
  modules: [{ name: "health", routes: () => [{ id: "/health", file: "/srv/health/Page.meeko", layouts: [] }] }],
});

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/framework/modules.ts