Question
Can someone give example of using App platform's environmental variables in node.js
I am using Digital Ocean’s app platform to host a NodeJS app. I do not understand the documentation for using environmental variables within my NodeJS code. https://www.digitalocean.com/docs/app-platform/how-to/use-environment-variables/#define-build-time-environment-variables when I try to add the environmental variable like I think the documentation wants me to I get a syntax error: mongoose.connect(${_self.DATABASE_URL}, {useNewUrlParser: true});
What is the correct usage?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×