Framework Integrations
PM2
How to use Infisical to inject environment variables and secrets with PM2 into a Node.js app
Prerequisites:
- Set up and add envars to Infisical Cloud
- Install the CLI
Initialize Infisical for your Node.js app
# navigate to the root of your of your project
cd /path/to/project
# then initialize infisical
infisical init
Create a bash or js script
infisical run -- npm start
Start your application as usual but with the script
pm2 start infisical-run.sh