🌍Environment variables
Multijet offers environment variable validation for microservices using Joi
.
To add an environment variable to a microservice, simply edit the env.ts
file located in <service-name>/src/utils/env.ts
:
env.ts
If you want to run your project locally using AWS Lambda or Docker, you can specify the environment variables in the global .env
file located in <project-name>/.env
(the file is ignored by default for security reasons, if it does not exists you can simply create it).
Example of a simple .env
file containing one variable called environment
:
.env
All the variables specified in this file will be assigned to every microservice.
With this, running your project locally will assign every environment variables needed by your microservices.
Last updated