dns-middleware

0.1.2 • Public • Published

dns-middleware

DNS-lookup middleware for express/connect

Usage

The passed request must have a body consisting of JSON with the following keys:

query

  • The address queried

type (defaults to: 'A')

  • The type of query made

server (defaults to: '8.8.8.8')

  • The server to make the query from

The answer is passed back as a JSON with the following keys:

answer

  • Contains all the answer-sections in an array

time

  • The time it took to make the request

Example

See: dns-middleware-example

License

Unless stated elsewhere, the license as in the LICENSE-file

/dns-middleware/

    Package Sidebar

    Install

    npm i dns-middleware

    Weekly Downloads

    1

    Version

    0.1.2

    License

    DWTFYW

    Last publish

    Collaborators

    • gildean