# dns-express

> An Express style DNS server

Latest version **1.4.1** (published 2016-11-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install dns-express
pnpm add dns-express
yarn add dns-express
bun add dns-express
```

## 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.4.1 |
| Published | 2016-11-09 |
| First published | 2015-06-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Dan VerWeire |
| Maintainers | wankdanker |
| Keywords | dns, server, simple, express |

## Links

- npm: https://www.npmjs.com/package/dns-express
- Repository: https://github.com/wankdanker/node-dns-express
- Issues: https://github.com/wankdanker/node-dns-express/issues
- npm.io page: https://npm.io/package/dns-express

## Dependencies (2)

- [usey](https://npm.io/package/usey.md) ^1.5.0
- [native-dns](https://npm.io/package/native-dns.md) ^0.7.0

## Recent versions

- 1.4.1 (latest) — 2016-11-09
- 1.4.0 — 2016-09-07
- 1.3.0 — 2016-09-07
- 1.2.0 — 2016-08-22
- 1.1.0 — 2016-08-22
- 1.0.1 — 2015-06-04

## README

dns-express
-----------

An attempt at an Express style DNS server

install
-------

```bash
npm install dns-express
```

example
-------

```js
var server = require('dns-express')();

server.a(/^(?:[^.]+\.)*domain\.com$/i, function (req, res, next) {
	//Add an A record to the response's answer.
	res.a({
		name : req.name
		, address : '1.2.3.4'
		, ttl : 600
	})

	return res.end();
});

server.use(function (req, res) {
	//End the response if no "routes" are matched
	res.end();
});

server.listen(53535)
```

```bash
dig something.domain.com @127.0.0.1 -p 53535
```

todo
----

* Expand documentation
* Tests

license
-------

MIT

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