Socket
Socket
Sign inDemoInstall

dynect

Package Overview
Dependencies
8
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    dynect

Dyn DNS API connector for node.js


Version published
Maintainers
1
Install size
488 kB
Created

Readme

Source

Dyn DNS API connector for node.js.

example 1 :

add A record

	var Dynect = require('dynect');

	// open Dynect API session
	var dynect = new Dynect('customername', 'username', 'password');

	dynect.on('connected', function () {
		var zone = 'example.com';

		// add A record with 5 min TTL
		dynect.addRecord('A', zone, 'www.example.com', {
			address: '123.45.67.89'
		}, 300, function (addResponse) {
			console.log(addResponse);

			//publish zone
			dynect.publishZone(zone, function (publishResponse) {
				console.log(publishResponse);

				// close Dynect API session
				dynect.disconnect();
			});
		});
	})

	dynect.connect();

example 2 :

add CNAME record

	var Dynect = require('dynect');

	// open Dynect API session and send keepalive every 5mins
	var dynect = new Dynect('customername', 'username', 'password', 300000);

	dynect.on('connected', function () {
		var zone = 'example.com';

		// add CNAME record with default TTL
		dynect.addRecord('CNAME', zone, 'www.example.com', {
			cname: 'example.mydomain.com'
		}, 0, function (addResponse) {
			console.log(addResponse);

			// publish zone
			dynect.publishZone(zone, function (publishResponse) {
				console.log(publishResponse);
			});
		});
	})

	dynect.connect();

installation

  npm install dynect
author: ashley @frisB.com

Keywords

FAQs

Last updated on 30 Apr 2013

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc