CHART/DOCS/ADAPTERS

Deploying: adapters

Pick a host. The build checks your choice.

marisjs build produces a dist/ directory that any adapter can turn into a running deployment. Two adapters ship in the @marisjs org - install whichever fits your target:

Adapter What it does
@marisjs/adapter-node Plain Node.js HTTP server. Serves static routes from disk, re-executes data() routes per request, and dispatches API routes and middleware. Clean URL routing, no framework dependencies.
@marisjs/adapter-static Produces a clean static-only output directory for any static host: S3, GitHub Pages, Cloudflare Pages, CDNs. Fails loudly if any route requires a server.
$ npx @marisjs/adapter-node ./dist
-> serving /               index.html (static)
-> serving /docs           docs.html (static)
-> serving /api/checkout   api/checkout.mjs (POST, GET)
-> http://localhost:3000
$ npx @marisjs/adapter-static ./dist ./static-out
error: build contains 1 API route(s) that require server-side execution
/api/checkout → api/checkout.mjs (methods: POST, GET)
-> use adapter-node, or remove the api/ directory

@marisjs/adapter-node runs on any platform that can run Node.js - VPS, Docker, Railway, Render, Fly.io - while @marisjs/adapter-static rejects builds containing server-only routes (pages that use data()), API routes, or middleware, with an error naming every affected route, so you cannot accidentally ship server code to a static host.

Clean URLs

Both adapters map dist/docs/install.html to /docs/install with no extension and no redirect - the routes are recorded in dist/routes.json at build time and served verbatim. The static adapter additionally writes nested routes as folders (/docs → docs/index.html), preserving URL depth so the compiler's depth-aware references resolve unchanged.

This site: marisjs.vercel.app is built with marisjs build and deployed as static output. Every page here is static HTML; the examples are the only pages with hydrated islands.