Socket
Book a DemoInstallSign in
Socket

digitalocean-domain-records

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

digitalocean-domain-records

Manage Digital Ocean domain records from the command line

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

Description

Provision a new A record on Digital Ocean.

Getting Started

Setup

Generate new read and write api keys at https://cloud.digitalocean.com/settings/api/tokens

Clone this repo, rename .env.example to .env, put your api keys in. ROOT_IP should be the ip that you wish to send traffic (the IP of a droplet). The ROOT_DOMAINNAME should be the root domain.

Usage

With npm

Install the cli

npm install -g digitalocean-domain-records

then either run from the cli, passing environment variables:

ROOT_IP=1.2.3.4 ROOT_DOMAINNAME=example.com DO_KEY_WRITE=abcdefghijklmnop DO_KEY_READ=abcdefghijklmnop digitalocean-domain-records --name testing

Or create a config file by creating an .env file that looks like this:

ROOT_IP=1.2.3.4
ROOT_DOMAINNAME=example.com
DO_KEY_READ=abcdefghijklmnop
DO_KEY_WRITE=abcdefghijklmnop

Then run this in the same directory:

digitalocean-domain-records --name testing

From source

Clone this repo, rename .env.example to .env, put your api keys in. ROOT_IP should be the ip that you wish to send traffic (the IP of a droplet). The ROOT_DOMAINNAME should be the root domain.

Given a .env file of:

ROOT_IP=1.2.3.4
ROOT_DOMAIN=example.com
DO_KEY_READ=asdasdasdakmsdlkamlsdkmalkmsdlaksmlkamsldkmasda
DO_KEY_WRITE=askmlaksmdlkamsdlkamsldkmalskdmlaksmdlkamsldkm

Running this:

node index.js --name tester

Should create tester.example.com and point it to 1.2.3.4. You can confirm this by viewing your networking setup at: https://cloud.digitalocean.com/domains/example.com (replace example.com in the url with your ROOT_DOMAINNAME.

FAQs

Package last updated on 09 Aug 2016

Did you know?

Socket

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