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
Weekly downloads
3
decreased by-62.5%
Maintainers
1
Install size
479 kB
Created
Weekly downloads
 

Readme

Source

Dyn DNS API connector for node.js.

example 1 :

add A record

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

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

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

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

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

	dynector.connect();

example 2 :

add CNAME record

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

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

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

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

	dynector.connect();

Installation

Installing npm (node package manager)

  curl http://npmjs.org/install.sh | sh

Installing dynector

  [sudo] npm install dynect
Author: Ashley Brener

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