Skip to main content

Required env variables for API

The following env variables are required for the backend api to run. If you miss any of the required variable, you should see the api startup fail with a [API] Environment variable error similar to below example api error

Required variables

NameTypeExample
APP_ENVoneof ['local', 'test', 'dev', 'prod']APP_ENV=local
PG_DATABASE_URLpostgres connection uripostgresql://pguser:password@localhost:5435/inhouse_ai_gpt?schema=public
SALT_ROUNDSnumberSALT_ROUNDS=10
JWT_ACCESS_TOKEN_EXPIRATION_HOURSnumberJWT_ACCESS_TOKEN_EXPIRATION_HOURS=4
JWT_REFRESH_TOKEN_EXPIRATION_HOURSnumberJWT_REFRESH_TOKEN_EXPIRATION_HOURS=1
JWT_SECRETstringJWT_SECRET=secret123
Please note

With the above required env variables present, you would be able to use the api, login.

Other env variables are required when you use the corresponding feature within the app. eg: OPENAI_API_KEY when using OpenAI as the model for summarization.

These variables are described in the next section.