Skip to content

nickypike/dns-lookup

 
 

Repository files navigation

dns-lookup

DNS lookups as an API

Deploy

Deploy to Cloud Foundry

cd dns-lookup
cf push

You need only one deployment per CF Foundation. All users can share the same instance of the app.

Local operation

For development and debugging purposes, you can deploy locally, too. This won't have access to BOSH DNS's servers, however.

node ./server.js
curl 'http://localhost:8080/json/resolve?host=www.yahoo.com'

Web UI and API

API

  • The service offers one endpoint, resolve which takes a single argument, host. See examples for usage.

Web UI

dns lookup screenshot

Usage

cf create-service ...
cf create-service-key SERVICE-INSTANCE KEY-NAME
cf service-key SERVICE-INSTANCE KEY-NAME | tail +2 | jq .hostname
curl 'http://dns-lookup.APP-DOMAIN/resolve?host=HOSTNAME'

Where:

  • SERVICE-INSTANCE: The name of the service you'd like to connect to
  • KEY-NAME: A service key which will contain the credentials needed
  • APP-DOMAIN: Your cloud foundry DNS domain component
  • HOSTNAME: The hostname component of the service key's credentials

About

DNS lookups as an API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 75.7%
  • CSS 13.9%
  • HTML 10.4%