1.4.1 • Published 7 years ago

dns-express v1.4.1

Weekly downloads
22
License
MIT
Repository
github
Last release
7 years ago

dns-express

An attempt at an Express style DNS server

install

npm install dns-express

example

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)
dig something.domain.com @127.0.0.1 -p 53535

todo

  • Expand documentation
  • Tests

license

MIT

1.4.1

7 years ago

1.4.0

8 years ago

1.3.0

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.1

9 years ago