Skip to content

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

const express = require('express');

const miki = require('miki-template');



const app = express();

miki.setupExpress(app, { extension: 'html', views: './views' });



app.get('/', (req, res) => res.render('home', { user: req.user }));



app.listen(3000);
import express from 'express';

import miki from 'miki-template';



const app = express();

miki.setupExpress(app, { extension: 'html', views: './views' });



app.get('/', (req, res) => res.render('home', { user: req.user }));



app.listen(3000);

Notes

  • For CommonJS: const miki = require('miki-template');

  • For ESM / Bun: import miki from 'miki-template'; or import * as miki from 'miki-template';

  • When rendering files, pass options.views or 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.

Installation

# npm

npm install miki-template



# bun

bun add miki-template



# yarn

yarn add miki-template

Next Steps