mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-05-14 10:58:46 +00:00
Changes env file
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
NC_USER=xxx
|
||||
NC_API_KEY=xxxxxxxxxxxxxxx
|
||||
NC_DOMAIN=domain.com
|
||||
IP_ADDRESS=100.100.100.100
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
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 { getDomains: gd } = require('../utils/domain');
|
||||
|
||||
@@ -28,7 +28,7 @@ const registerDomains = async ({ domainService, getDomains }) => {
|
||||
};
|
||||
|
||||
const main = async () => {
|
||||
console.log('Registering domains...');
|
||||
console.log(`Registering domains in ${ENV}...`);
|
||||
const result = await registerDomains({ domainService: dc, getDomains: gd });
|
||||
console.log(result);
|
||||
};
|
||||
|
||||
+5
-4
@@ -1,14 +1,15 @@
|
||||
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 = {
|
||||
VALID_RECORD_TYPES: ['CNAME', 'A', 'ALIAS', 'URL'],
|
||||
NC_DOMAIN: NC_DOMAIN || 'booboo.xyz',
|
||||
NC_USER: NC_USER || 'test',
|
||||
NC_API_KEY: NC_API_KEY || 'fake_key',
|
||||
ENV: 'sandbox',
|
||||
ENV,
|
||||
TTL: 5*60,
|
||||
IP_ADDRESS: '100.100.100.100',
|
||||
IP_ADDRESS,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user