Skip to content

Configuration Options

Ahmed Glez edited this page Mar 30, 2023 · 1 revision

Configuration Options

The Cujae LDAP Manager API can be configured using environment variables. The following environment variables are available:

  • PORT: The port number that the server should listen on. Default value is 3000.
  • MONGODB_URI: The URI of the MongoDB instance to use. If not set, the API will use the default mongodb://localhost/ldap-manager URI.
  • JWT_SECRET: The secret used to sign JSON Web Tokens (JWTs) for authentication. If not set, the API will use the default value of secret.
  • JWT_EXPIRES_IN: The expiration time for JSON Web Tokens (JWTs) in seconds. If not set, the API will use the default value of 3600 seconds (1 hour).

To set an environment variable, you can use the export command in your terminal:

export VARIABLE_NAME=value

Alternatively, you can create a .env file in the root directory of the project with the format of .env.example file

Clone this wiki locally