mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-10-13 16:15:07 +00:00
Changes env file
This commit is contained in:
1 parent
db974e1848
commit
7f982a1908
3 files changed
+8
-6
No files matched your search
@@ -1,3 +1,4 @@
|
|||||||
NC_USER=xxx
|
NC_USER=xxx
|
||||||
NC_API_KEY=xxxxxxxxxxxxxxx
|
NC_API_KEY=xxxxxxxxxxxxxxx
|
||||||
NC_DOMAIN=domain.com
|
NC_DOMAIN=domain.com
|
||||||
|
IP_ADDRESS=100.100.100.100
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
const R = require('ramda');
|
const R = require('ramda');
|
||||||
const { VALID_RECORD_TYPES, TTL } = require('../utils/constants');
|
const { VALID_RECORD_TYPES, TTL, ENV } = require('../utils/constants');
|
||||||
const { domainService: dc } = require('../utils/domain-service');
|
const { domainService: dc } = require('../utils/domain-service');
|
||||||
const { getDomains: gd } = require('../utils/domain');
|
const { getDomains: gd } = require('../utils/domain');
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ const registerDomains = async ({ domainService, getDomains }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const main = async () => {
|
const main = async () => {
|
||||||
console.log('Registering domains...');
|
console.log(`Registering domains in ${ENV}...`);
|
||||||
const result = await registerDomains({ domainService: dc, getDomains: gd });
|
const result = await registerDomains({ domainService: dc, getDomains: gd });
|
||||||
console.log(result);
|
console.log(result);
|
||||||
};
|
};
|
||||||
|
|||||||
+5
-4
@@ -1,14 +1,15 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
require('dotenv').config({ path: path.resolve('.env.sandbox') });
|
const { ENV = 'sandbox' } = process.env;
|
||||||
|
require('dotenv').config({ path: path.resolve(`.env.${ENV}`) });
|
||||||
|
|
||||||
const { NC_USER, NC_API_KEY, NC_DOMAIN } = process.env;
|
const { NC_USER, NC_API_KEY, NC_DOMAIN, IP_ADDRESS } = process.env;
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
VALID_RECORD_TYPES: ['CNAME', 'A', 'ALIAS', 'URL'],
|
VALID_RECORD_TYPES: ['CNAME', 'A', 'ALIAS', 'URL'],
|
||||||
NC_DOMAIN: NC_DOMAIN || 'booboo.xyz',
|
NC_DOMAIN: NC_DOMAIN || 'booboo.xyz',
|
||||||
NC_USER: NC_USER || 'test',
|
NC_USER: NC_USER || 'test',
|
||||||
NC_API_KEY: NC_API_KEY || 'fake_key',
|
NC_API_KEY: NC_API_KEY || 'fake_key',
|
||||||
ENV: 'sandbox',
|
ENV,
|
||||||
TTL: 5*60,
|
TTL: 5*60,
|
||||||
IP_ADDRESS: '100.100.100.100',
|
IP_ADDRESS,
|
||||||
};
|
};
|
||||||
Reference in new issue
Block a user