Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wankdanker/node-dns-express
An Express style DNS server
https://github.com/wankdanker/node-dns-express
dns dns-server nodejs
Last synced: 3 months ago
JSON representation
An Express style DNS server
- Host: GitHub
- URL: https://github.com/wankdanker/node-dns-express
- Owner: wankdanker
- Created: 2015-06-04T18:51:57.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-09T19:10:08.000Z (about 8 years ago)
- Last Synced: 2024-09-30T12:23:46.080Z (3 months ago)
- Topics: dns, dns-server, nodejs
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 9
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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
* Testslicense
-------MIT