Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/benoitzohar/netlify-record-updater

A remote record updater for Netlify DNS
https://github.com/benoitzohar/netlify-record-updater

Last synced: 22 days ago
JSON representation

A remote record updater for Netlify DNS

Awesome Lists containing this project

README

        

# 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

```bash
npm install -g netlify-record-updater
```

or

```bash
yarn global add netlify-record-updater
```

To update the record using the current public IP:

```bash
netlify-record-updater home.test.com
```

To update the record using a custom IP:

```bash
netlify-record-updater home.test.com --ip "1.2.3.4"
```

Replace `` by your [Netlify API token (Personal Token)](https://app.netlify.com/user/applications).

For help:

```bash
netlify-record-updater --help
```

## ES Module Usage

### Installation

```bash
npm install netlify-record-updater
```

or

```bash
yarn add netlify-record-updater
```

```js
import { updateRecord } from "netlify-record-updater";

updateRecord("home.test.com", "");
// or
updateRecord("home.test.com", "", "1.2.3.4");
```

### Publish

```
yarn publish
```