Complete class interface
Usual class interface
Complete endpoint interface
Endpoint path are just basic strings
Complete endpoint type interface
Endpoint handler for http endpoints
Endpoint type definition for http endpoints
Endpoint handler for socket endpoints
Endpoint type definition for socket endpoints
Check if a key is in the environment variables, then return its value, otherwise return the default value
Key to check in the env variables
Default value to return if the key is missing
The value of env variable or the default value is the key is missing
defaultEnv('MONGO_URL', 'mongodb+srv://localhost:27017')
// -> value of the env, if MONGO_URL is set to env, will return the
// -> 'mongodb+srv://localhost:27017', otherwise
Same as defaultEnv but will check if the environment is dev or prod to use different keys
Key to use while in development mode
Key to use while in production mode
Default value to use if the key is missing
The value of the env variables or the default value is the key is missing
devProdEnv('PORT_DEV', 'PORT', '3000')
// -> value of the PORT_DEV env field, if the mode is development
// -> value of the PORT env field, if the mode is production
// -> '3000', if the env field is not defined
Generated using TypeDoc
Abstract class interface
https://github.com/microsoft/TypeScript/issues/17572#issuecomment-319994873