# kob

> Kob

Latest version **1.0.4** (published 2015-08-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install kob
pnpm add kob
yarn add kob
bun add kob
```

## 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.0.4 |
| Published | 2015-08-09 |
| First published | 2015-05-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+4 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Snowuly |
| Maintainers | tonychen |
| Keywords | koa, web, app, http, framework |

## Links

- npm: https://www.npmjs.com/package/kob
- Repository: https://github.com/chentony/kob
- Homepage: https://github.com/chentony/kob#readme
- Issues: https://github.com/chentony/kob/issues
- npm.io page: https://npm.io/package/kob

## Dependencies (3)

- [koa](https://npm.io/package/koa.md) ^0.21.0
- [nunjucks](https://npm.io/package/nunjucks.md) ^1.3.4
- [path-to-regexp](https://npm.io/package/path-to-regexp.md) ^1.2.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2015-08-09
- 1.0.3 — 2015-08-09
- 1.0.2 — 2015-07-22
- 1.0.1 — 2015-07-03
- 1.0.0 — 2015-07-01
- 0.0.10 — 2015-06-28
- 0.0.9 — 2015-05-30
- 0.0.8 — 2015-05-28
- 0.0.7 — 2015-05-28
- 0.0.6 — 2015-05-27
- 0.0.5 — 2015-05-27
- 0.0.3 — 2015-05-27
- 0.0.2 — 2015-05-27
- 0.0.1 — 2015-05-27

## README

# Intro

Enhanced koa framework, support router and template

## Installation

```
$ npm install kob
```

## Example

```js
var kob = require('kob');
var app = kob();

// same as koa

app.use(function* (){
  this.body = 'Hello World';
});

// auto compose middlewares

app.use(function* () {
  this.body = 'Hi'
}, function* () {
  this.body += ' Tony!';
});

// router

app.get('/:name', function* (name) {
  yield* this.render('template.html', { // using nunjucks
    name: name
  });
});

// support middlewares while using router

app.get('/:name', function* (next){
  this.hello = 'Hi ';
}, function* (name, next) {
  this.body = this.hello + name;
});


app.listen(3000);
```

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