Optional
loggerPort and provider logger, to be used internally
Provider name, used for human-readable logs and identification
Provider type, kind of component form the points of view of the health check standard https://datatracker.ietf.org/doc/html/draft-inadarei-api-health-check-06
Optional
useString is used as prefix for the environment configuration variables, represented in
SCREAMING_SNAKE_CASE
, that will parsed to camelCase
and merged with the rest of the
configuration.
// Environment variables
process.env.PORT_NAME_TYPE = 'http';
process.env.PORT_NAME_HOST = 'localhost';
process.env.PORT_NAME_PORT = '8080';
process.env.PORT_NAME_OTHER_CONFIG__MY_CONFIG = 'true';
// Provider configuration
{
name: 'port-name',
type: 'http',
validation: {...},
envPrefix: 'PORT_NAME_',
}
// Resulting configuration
{
type: 'http',
host: 'localhost',
port: 8080,
otherConfig: {
myConfig: true,
},
}
Port validation options
Provider configuration options