1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

DOCS: [GitBook] Added code blocks syntax for dnsconfig.js (#2137)

This commit is contained in:
Jeffrey Cafferata
2023-03-11 14:42:01 +01:00
committed by GitHub
parent 0bf851ec06
commit 4ad56417c0
42 changed files with 149 additions and 42 deletions

View File

@@ -38,6 +38,7 @@ This provider does not recognize any special metadata fields unique to name.com.
An example `dnsconfig.js` configuration with NAMEDOTCOM
as the registrar and DNS service provider:
{% code title="dnsconfig.js" %}
```javascript
var REG_NAMECOM = NewRegistrar("name.com");
var DSP_NAMECOM = NewDnsProvider("name.com");
@@ -46,10 +47,12 @@ D("example.tld", REG_NAMECOM, DnsProvider(DSP_NAMECOM),
A("test", "1.2.3.4")
);
```
{% endcode %}
An example `dnsconfig.js` configuration with NAMEDOTCOM
as the registrar and DNS only, DNS hosted elsewhere:
{% code title="dnsconfig.js" %}
```javascript
var REG_NAMECOM = NewRegistrar("name.com");
var DSP_R53 = NewDnsProvider("r53");
@@ -58,6 +61,7 @@ D("example.tld", REG_NAMECOM, DnsProvider(DSP_R53),
A("test","1.2.3.4")
);
```
{% endcode %}
{% hint style="info" %}
**NOTE**: name.com does not allow control over the NS records of your zones via the api. It is not recommended to use name.com's dns provider unless it is your only dns host.