Skip to content

@saflib/node


Interface: NodeEnvSchema ​

Environment variables for the @saflib/node package, including inherited variables via extends. Generated by @saflib/env. To update, make changes to the adjacent env.schema.json, navigate to the package root, and run npm exec saf-env generate.

Extends ​

  • EnvEnvSchema

Properties ​

ADMIN_EMAILS ​

ADMIN_EMAILS: string

Comma-separated list of emails who will get the 'admin' scope. Emails must be validated to receive this scope.


CLIENT_SUBDOMAINS ​

CLIENT_SUBDOMAINS: string

Comma-separated list of client subdomains, e.g. 'www,app,auth,'. Include an empty string (such as in the example) to indicate there's a client for the root domain.

Inherited from ​

EnvEnvSchema.CLIENT_SUBDOMAINS


DEPLOYMENT_NAME ​

DEPLOYMENT_NAME: string

The name of the deployment, e.g. 'production', 'staging', 'development'. This may be used in strings such as database file names and logging metadata; each deployment should have a unique name.

Inherited from ​

EnvEnvSchema.DEPLOYMENT_NAME


DOMAIN ​

DOMAIN: string

The root domain of the deployment, e.g. 'saf.com'.

Inherited from ​

EnvEnvSchema.DOMAIN


LOG_LEVEL? ​

optional LOG_LEVEL: "error" | "warn" | "info" | "verbose" | "debug" | "silly"

Minimum Winston log level for console output (error, warn, info, verbose, debug, silly). HTTP access lines via Morgan are unaffected.


NODE_ENV ​

NODE_ENV: "development" | "production" | "test"

The environment of the deployment. Generally should avoid using this, consider its use deprecated, prefer instead more specific environment variables.

Inherited from ​

EnvEnvSchema.NODE_ENV


PROTOCOL ​

PROTOCOL: "https" | "http"

The protocol of the deployment, e.g. 'https'

Inherited from ​

EnvEnvSchema.PROTOCOL


SAF_INTERNAL_ASSERTION_KEYS? ​

optional SAF_INTERNAL_ASSERTION_KEYS: string

HMAC keys for signing/verifying internal identity assertions. Format: keyId:base64secret[,keyId:base64secret]. Sign with the first entry; verify against all (rotation = prepend a new key). Sentinel mock (e.g. Infisical mock placeholder) expands to a fixed local key. Optional — only required in environments that use the internal request channel.


TZ ​

TZ: "UTC"

The timezone of the deployment, e.g. 'America/New_York'. Must be UTC.

Inherited from ​

EnvEnvSchema.TZ