Socket
Socket
Sign inDemoInstall

@codefeathers/do-node

Package Overview
Dependencies
3
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @codefeathers/do-node

A (partial) DigitalOcean wrapper for Node.


Version published
Weekly downloads
2
increased by100%
Maintainers
1
Install size
339 kB
Created
Weekly downloads
 

Readme

Source

do-node

A lightweight promise based Node wrapper for DigitalOcean API v2

Currently do-node only supports domain and domain records functions.

Installation

npm install --save @codefeathers/do-node

Usage

  • Get an API key from DigitalOcean.

  • Add it to a config.js file in the same folder as your entry point like this:

module.exports = {
	token: '241f24ac97abe3321b0c972d97579ace4ae38c34a709169289c6474d58d8f',
}
  • Import it in your file:
const digitalOcean = require('do-node');

digitalOcean.domain.Create({
		name: 'example.com',
		ip: '1.2.3.4',
	})
	.then(res => console.log(res))
	.catch(err => console.log(err.response.data.message));

digitalOcean.domain.Records.Update({
		name: 'example.com',
	}, 35459888)
	.then(res => console.log(res))
	.catch(err => console.log(err.response.data.message));

Keywords

FAQs

Last updated on 11 Feb 2018

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