netlify-record-updater
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

netlify-record-updater

A remote record updater for Netlify DNS that allows you to update your A records with a single command. This is useful if you want to keep your 'A' DNS record up to date with a dynamic IP address.

For example if you have a server at home and want to acces it, you can access it with home.mydomain.com if you run this script on your home machine (for example a raspberry pi) every X minutes using CRON.

CLI Usage

Installation

npm install -g netlify-record-updater

or

yarn add -g netlify-record-updater

To update the record using the current public IP:

netlify-record-updater home.test.com <NETLIFY_API_TOKEN>

To update the record using a custom IP:

netlify-record-updater home.test.com <NETLIFY_API_TOKEN> --ip "1.2.3.4"

Replace <NETLIFY_API_TOKEN> by your Netlify API token (Personal Token).

For help:

netlify-record-updater --help

ES Module Usage

Installation

npm install netlify-record-updater

or

yarn add netlify-record-updater
import { updateRecord } from "netlify-record-updater";

updateRecord("home.test.com", "<NETLIFY_API_TOKEN>");
// or
updateRecord("home.test.com", "<NETLIFY_API_TOKEN>", "1.2.3.4");

Publish

yarn publish

/netlify-record-updater/

    Package Sidebar

    Install

    npm i netlify-record-updater

    Weekly Downloads

    1

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    894 kB

    Total Files

    17

    Last publish

    Collaborators

    • benoitzohar