INNER CODE UNIT · TypeScript
getServerConfiguration
getwud/wud · app/configuration/index.ts:127
export function getServerConfiguration() {
const configurationFromEnv = get('wud.server', wudEnvVars);
const configurationSchema = joi.object().keys({
enabled: joi.boolean().default(true),
port: joi.number().default(3000).integer().min(0).max(65535),
tls: joi
.object({
enabled: joi.boolean().default(false),
key: joi.string().when('enabled', {
is: true,
then: joi.required(),
otherwise: joi.optional(),
}),
cert: joi.string().when('enabled', {
is: true,
then: joi.required(),
otherwise: joi.optional(),
}),