Skip to main content
Version: 3.x.x

Quickstart

Install Eta

npm install eta

In the root of your project, create templates/simple.eta

Hi <%= it.name %>!

Then, in your JS file:

import { Eta } from "eta"

const eta = new Eta({ views: path.join(__dirname, "templates") })

// Render a template

const res = eta.render("./simple", { name: "Ben" })
console.log(res) // Hi Ben!