I have files which are created via clojure
frontendapp.jar
backendapp.jar
and take an environment variable, APP_PORT
What I want to understand is how do I pass variables to the jar files so that they run with the variable APP_PORT?
My assumption is something like this
java -jar frontenapp.jar APP_PORT=8080
Am I correct in my assumption?
Apologies if the question is bad, it's my first time deploying a clojure application
Assuming a unixy shell like bash, you can do
or perhaps more commonly:
In the first case,
APP_PORTwill only be set in the environment given to the java process. In the second case, withexport, the variable will be set in the environments of all processes subsequently started from that shell.