# koa-art-template

> art-template render middleware for koa

Latest version **1.1.1** (published 2017-06-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install koa-art-template
pnpm add koa-art-template
yarn add koa-art-template
bun add koa-art-template
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2017-06-13 |
| First published | 2017-04-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 7.6.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 40 |
| Author | aui |
| Maintainers | aui |
| Keywords | koa, render, view, art-template |

## Links

- npm: https://www.npmjs.com/package/koa-art-template
- Repository: https://github.com/aui/koa-art-template
- Homepage: https://github.com/aui/koa-art-template#readme
- Issues: https://github.com/aui/koa-art-template/issues
- npm.io page: https://npm.io/package/koa-art-template

## Dependencies (1)

- [debug](https://npm.io/package/debug.md) ^2.6.1

## Recent versions

- 1.1.1 (latest) — 2017-06-13
- 1.1.0 — 2017-04-20
- 1.0.0 — 2017-04-18
- 0.0.2 — 2017-04-16
- 0.0.1 — 2017-04-16

## README

# koa-art-template

[![NPM Version](https://img.shields.io/npm/v/koa-art-template.svg)](https://npmjs.org/package/koa-art-template)
[![Node.js Version](https://img.shields.io/node/v/koa-art-template.svg)](http://nodejs.org/download/)

Koa art-template view render middleware. support all feature of [art-template](https://github.com/aui/art-template).

## Install

```shell
npm install --save art-template
npm install --save koa-art-template
```

## Usage

### Example

```js
const Koa = require('koa');
const render = require('koa-art-template');

const app = new Koa();
render(app, {
  root: path.join(__dirname, 'view'),
  extname: '.art',
  debug: process.env.NODE_ENV !== 'production'
});

app.use(async function (ctx) {
  await ctx.render('user');
});

app.listen(8080);
```

Or you can checkout the [example](https://github.com/aui/koa-art-template/tree/master/example).

## Options

Supports [art-template options](https://github.com/aui/art-template#Options).

## State

Support [`ctx.state` in koa](https://github.com/koajs/koa/blob/master/docs/api/context.md#ctxstate).

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