# koa-eta

> eta template rendering for Koa

Latest version **0.1.2** (published 2023-05-16) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install koa-eta
pnpm add koa-eta
yarn add koa-eta
bun add koa-eta
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2023-05-16 |
| First published | 2023-05-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | wrapperup |
| Maintainers | wrapperup |
| Keywords | koa, eta, template-engine, middleware, render, view |

## Links

- npm: https://www.npmjs.com/package/koa-eta
- Repository: https://github.com/wrapperup/koa-eta
- Issues: https://github.com/wrapperup/koa-eta/issues
- npm.io page: https://npm.io/package/koa-eta

## Dependencies (1)

- [eta](https://npm.io/package/eta.md) ^2.1.2

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2023-05-16
- 0.1.1 — 2023-05-16
- 0.1.0 — 2023-05-16

## README

# koa-eta
A tiny library to bring Eta to Koa.

## Install
```bash
npm install koa-eta --save
```

## Basic Usage
```javascript
const Koa = require('koa');
const koaEta = require('koa-eta');

const app = new Koa();

koaEta(app, {
  views: __dirname + '/views'
  // ... other Eta options
  // see https://eta.js.org/docs/api/configuration for more
});

app.use(async ctx => {
  ctx.state = {
    title: 'Koa Eta'
  };

  await ctx.render('index', {
    message: 'Hello World!'
  });
});
```

## Mounting `ctx.render`
Call `koaEta(app, config)` with your Koa app and Eta config.

See https://eta.js.org/docs/learn/configuration or https://eta.js.org/docs/api/configuration for parameters to the config object.

## License
MIT

---
_Source: https://npm.io/package/koa-eta · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
