Docs
Environment Variables

Environment Variables

Environment Variables are used for all settings within the Collections project.

Config Files

Collections attempts to read the .env file setting as an environment Variable. It has the following structure.

.env
AUTH_SECRET = '04a460c0bd9b99...';
DATABASE_URL = 'postgresql://...';

General

VariableDescriptionDefault Value
PUBLIC_SERVER_ORIGINExpress Server Originhttp://app.test.com:4000
PUBLIC_PORTAL_SUBDOMAINSubdomain of the portalapp
SERVER_HOSTExpress Server Hosttest.com
SERVER_PORTApp Server Port4000
ADMIN_PORTApp Admin Port4001
NODE_ENVNode Execution Environmentdevelopment

Storage

VariableDescriptionDefault Value
STORAGE_DRIVERDriver name of destination storage(local, aws-s3)local
STORAGE_LOCAL_ROOTLocal storage destination directoryuploads
STORAGE_KEYCloud Storage Access Key--
STORAGE_SECRETCloud Storage Secrets--
STORAGE_BUCKETCloud Storage Bucket--
STORAGE_REGIONCloud Storage Region--

Database

VariableDescriptionDefault Value
AUTH_SECRETSecret for authentication (email provider only)--
DATABASE_URLURL to connect to PostgreSQL--

Express

VariableDescriptionDefault Value
REQ_LIMITMaximum size of request body4mb

Authentication

VariableDescriptionDefault Value
AUTH_GITHUB_IDID for GitHub OAuth authentication, obtained from the GitHub Developer Portal.--
AUTH_GITHUB_SECRETSECRET for GitHub OAuth authentication, obtained from the GitHub Developer Portal.--
AUTH_GOOGLE_IDID for Google OAuth authentication, obtained from Google Cloud Platform.--
AUTH_GOOGLE_SECRETSECRET for Google OAuth authentication, obtained from Google Cloud Platform.--
PUBLIC_AUTH_PROVIDERSLogin method provided by the application.email,google,github

CORS

VariableDescriptionDefault Value
CORS_ENABLEDSet to true to enable the entire CORS configuration.false
CORS_ORIGINAccess-Control-Allow-Origin Can be specified as a string or regular expression. You can specify false to disable CORS.false
CORS_METHODSAccess-Control-Allow-Methods Pass a comma-separated string of methods to allow.GET,POST,PATCH,DELETE
CORS_ALLOWED_HEADERSAccess-Control-Allow-Headers If not specified, reflects the headers specified in the Access-Control-Request-Headers header of the request.Content-Type,Authorization
CORS_EXPOSED_HEADERSAccess-Control-Expose-Headers If not specified, custom headers are not exposed.Content-Range
CORS_CREDENTIALSAccess-Control-Allow-Credentials Set to true to enable.true
CORS_MAX_AGESpecify an integer value when passing the Access-Control-Max-Age header.1800

Log

VariableDescriptionDefault Value
PUBLIC_LOG_LEVELLog output level (fatal, error, warn, info, debug, trace, silent)info
PUBLIC_LOG_HIDE_OBJECTDon't display detailed request/response information output by pino.true

Email

VariableDescriptionDefault Value
EMAIL_TRANSPORTEmail Sending Providersendgrid
EMAIL_FROMEmail Source Email Address--
EMAIL_SENDGRID_API_KEYAPI key for sendgrid--

Editor

VariableDescriptionDefault Value
TIPTAP_PRO_TOKENToken for using the TipTap extension.--

System

VariableDescriptionDefault Value
RESERVED_SUBDOMAINSReserved subdomains that cannot be assigned to a project.app
Contact