# genhand

> Minimal generator-based HTTP handler

Latest version **0.0.3** (published 2014-06-10) · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2014-06-10 |
| First published | 2014-06-10 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | CoderPuppy |
| Maintainers | drewyoung1 |

## Links

- npm: https://www.npmjs.com/package/genhand
- npm.io page: https://npm.io/package/genhand

## Dependencies (1)

- [cooperator](https://npm.io/package/cooperator.md) ^0.0.5

## Recent versions

- 0.0.3 (latest) — 2014-06-10
- 0.0.2 — 2014-06-10
- 0.0.1 — 2014-06-10
- 0.0.0 — 2014-06-10

## README

# GenHand

## Usage
```javascript
var genhand = require('genhand')
var http    = require('http')

var server = http.createServer(genhand(function*(req, res) {
	// Send the headers (and status code)
	yield genhand.head(200, { 'Content-Type': 'text/html' })
	yield '<h1>Hello World!</h1>'
}).on('error', function(err) {
	console.error(err.stack)
}))
server.listen(3000, function() {
	var addr = server.address()
	if(addr)
		console.log('Server listening on %s:%d', addr.address, addr.port)
	else
		console.log('Server starting: ok!')
})
```

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