@marko/express

Render Marko templates in an express application.

Usage no npm install needed!

<script type="module">
  import markoExpress from 'https://cdn.skypack.dev/@marko/express';
</script>

README


@marko/express
API Stability TypeScript Styled with prettier Build status Test Coverage NPM Version Downloads Browser Bundle Size

Render Marko templates in an express application.

Installation

npm install @marko/express

Example

import express from "express";
import markoMiddleware from "@marko/express";
import Template from "./template.marko";

const app = express();

app.use(markoMiddleware());

app.get("/", (req, res) => {
  // Streams Marko template into the response.
  // Forwards errors into expresses error handler.
  res.marko(Template, { hello: "world" });
});

Code of Conduct

This project adheres to the eBay Code of Conduct. By participating in this project you agree to abide by its terms.