Integrations Overview¶
miki-template works with all major Node.js web frameworks. Use render() for synchronous output or asyncRender() for templates with async filters/tags.
Supported Frameworks¶
-
Express — One-line setup with
setupExpress() -
Koa — Context helper using
asyncRender() -
Fastify — Inline
asyncRender()calls -
Hono — ESM-first, using
asyncRender() -
Elysia — ESM-first, using
asyncRender() -
NestJS — Module/Provider pattern
-
TSDX / TS-Economy (TSed) — TypeScript integration
Quick Example¶
Notes¶
-
For CommonJS:
const miki = require('miki-template'); -
For ESM / Bun:
import miki from 'miki-template';orimport * as miki from 'miki-template'; -
When rendering files, pass
options.viewsor set framework view roots so the engine can locate templates. -
Use
asyncRender()if your templates use async filters, async tags, or{% load %}libraries with async components.