0.2.3 • Published 2 years ago

rackspace-dns-update v0.2.3

Weekly downloads
2
License
MIT
Repository
github
Last release
2 years ago

rackspace-dns-update

Update/create DNS records on Rackspace Cloud DNS. If you run a node app on a host with dynamic ip or frequently change the host, you can include this package to automatically update the DNS record in Rackspace Cloud DNS. If there is no A record with the specified record name, it will be created.

## Usage

Using environment variables

Set the following environment variables:

RACKSPACE_USER=username
# your rackspace username

RACKSPACE_API_KEY=key
# your rackspace api key

RACKSPACE_DOMAIN=domain.tld
# the name of the domain

RACKSPACE_RECORD=sub.domain.tld
# the name of the record to update/create. this is OPTIONAL, will be substituted
# with the domainname if not provided

And include the module:

const updateDNS = require('rackspace-dns-update');

updateDNS();
// this will update the DNS record every 15 minutes

updateDNS(5 * 60 * 1000);
// this will update the DNS record every 5 minutes

updateDNS(0);
// this will only update the DNS record once

Using function arguments

Include the module and pass the following arguments:

And include the module:

const updateDNS = require('rackspace-dns-update');

updateDNS(
  null,
  'username',
  'key',
  'domain.tld',
  'sub.domain.tld' // this is OPTIONAL
);
// this will update the DNS record every 15 minutes

updateDNS(
  5 * 60 * 1000,
  'username',
  'key',
  'domain.tld',
  'sub.domain.tld' // this is OPTIONAL
);
// this will update the DNS record every 5 minutes

updateDNS(
  0,
  'username',
  'key',
  'domain.tld',
  'sub.domain.tld' // this is OPTIONAL
);
// this will only update the DNS record once

License

MIT License

0.2.3

2 years ago

0.2.2

5 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago