Skip to content

Commit

Permalink
feat: default sites domain to main host
Browse files Browse the repository at this point in the history
  • Loading branch information
gempain committed Dec 3, 2020
1 parent a6ff61f commit c2ff7a2
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/env.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import chalk from 'chalk';
import { cidrSubnet } from 'ip';
import {
array, boolean, number, string,
} from 'joi';
import { array, boolean, number, string } from 'joi';
import { tmpdir } from 'os';
import { EnvSpec, parseEnv } from './commons/env/parse-env';
import {
commaSeparatedStringToArray, stringToBoolean, stringToInt,
} from './commons/env/transformers';
import { commaSeparatedStringToArray, stringToBoolean, stringToInt } from './commons/env/transformers';
import { AppError } from './commons/errors/app-error';
import { URL } from 'url';
import { toUrl } from './commons/validators/to-url';
@@ -87,7 +83,7 @@ const envSpec: EnvSpec<Env> = {
schema: string().required().custom(toUrl),
},
MELI_SITES_DOMAIN: {
schema: string().required().custom(toUrl),
schema: string().optional().default(process.env.MELI_HOST).custom(toUrl),
},
MELI_PUBLIC_HOST: {
schema: string(),

0 comments on commit c2ff7a2

Please sign in to comment.