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
Required variables
Name | Type | Example |
---|---|---|
APP_ENV | oneof ['local', 'test', 'dev', 'prod'] | APP_ENV=local |
PG_DATABASE_URL | postgres connection uri | postgresql://pguser:password@localhost:5435/inhouse_ai_gpt?schema=public |
SALT_ROUNDS | number | SALT_ROUNDS=10 |
JWT_ACCESS_TOKEN_EXPIRATION_HOURS | number | JWT_ACCESS_TOKEN_EXPIRATION_HOURS=4 |
JWT_REFRESH_TOKEN_EXPIRATION_HOURS | number | JWT_REFRESH_TOKEN_EXPIRATION_HOURS=1 |
JWT_SECRET | string | JWT_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.