Skip to main content
Concepts

Route

Serve every deployed app from your own server.

appsRouter serves every deployed app at /:appId/*.

Getting started

Mount it at any prefix and forward the private /api/rivet/* callback to it:

import { appsRouter } from "@rivet-dev/dynamic-apps";
import { Hono } from "hono";

const server = new Hono();

server.all("/api/rivet/*", (c) => appsRouter.fetch(c.req.raw));
server.route("/apps", appsRouter);

A request to /apps/example/api/items reaches that app’s handler as /api/items.