From 704fbee8b0b9e698a07e46a13007092bd7507fed Mon Sep 17 00:00:00 2001 From: dumbutdumber Date: Thu, 25 Sep 2025 12:48:13 +0530 Subject: [PATCH] Update configuration.mdx --- pages/backend/configuration.mdx | 36 ++++++--------------------------- 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/pages/backend/configuration.mdx b/pages/backend/configuration.mdx index 7ca6ca7..36ee659 100644 --- a/pages/backend/configuration.mdx +++ b/pages/backend/configuration.mdx @@ -4,44 +4,20 @@ title: 'Configuration' # Backend Config Reference -The backend can be configured in 3 different ways: +The backend can be configured using: -- Make a `config.json` file in the working directory of the application (root of repository) -- Make a `.env` file in the working directory of the application (root of repository) - Add environment variables to your system (or container) -These different config options are all mutually inclusive, so you can use multiple at the same time if you want to. - With any of these configurations, you have to have atleast three variables set - for the server to function: [`postgres.connection`](#postgres-connection-⚠), - [`crypto.sessionSecret`](#crypto-session-secret-⚠) and - [`meta.name`](#meta-name-⚠) + for the server to function: [`DATABASE_URL`](#postgres-connection-⚠), + [`CRYPTO_SECRET`](#crypto-session-secret-⚠) and + [`META_NAME`](#meta-name-⚠) -### Method 1 - `config.json` +### Method - Environment -This method uses nesting, so the key `server.basePath` with the value of `"/backend"` will result in a file that looks like this: - -```json -{ - "server": { - "basePath": "/backend" - } -} -``` - -### Method 2 - `.env` - -The environment variable names use double underscores as separators and `MWB_` as the prefix. So the key `server.basePath` will result in the .env file like this: - -```sh -MWB_SERVER__BASE_PATH=/backend -``` - -### Method 3 - Environment - -This method is identical to the `.env` method listed above, but you add the variables to the environment instead of writing it in a file. +You add the variables to the environment. # Reference