0

I have hosted my node api on Plesk. But i cant find anywhere to add my env variables so that my api could work.

As you can see in the below image. custom variables option is below Application Startup File but in my case its not there.

enter image description here

Abhishek Kokate
  • 450
  • 2
  • 11

1 Answers1

0

(Plesk for Linux only) Custom environment variables - Here you can see a list of custom environment variables you have set for your application (if any). Click “[specify]” to add or remove environment variables for your application:

  • Click Add variable to add another environment variable to the list.
  • Type in the variable name in the left field, and its desired value in the right.
  • Edit the variables already on the list by clicking the corresponding field and typing in the new variable name or value.
  • Click Remove next to a variable to remove it from the list.

If you running Plesk on Linux env then the above option is available else you need to follow the below steps.

You need to use .env outside the application folder and create a custom script and pass these .env and send them as arguments when you run the node script. Check this link if it helps.

Apoorva Chikara
  • 8,277
  • 3
  • 20
  • 35