0.0.2 • Published 3 years ago
netlify-record-updater v0.0.2
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-updateror
yarn add -g netlify-record-updaterTo 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 --helpES Module Usage
Installation
npm install netlify-record-updateror
yarn add netlify-record-updaterimport { 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