Platform
Environment Variables
6 min
setting up environment variables on parse introduction in this guide, you will learn how to configure environment variables goal learn how to set and use environment variables page prerequisites there are no pre requisites to read or edit this page environment variables they are variables that describes your environment while constants cannot be reassigned during the execution, an environment variables may change one of the most popular environment variable is path which contains path to the folders that might contain the executables in a few words, an environment variable consists of a name / value pair and any number can be created and available for reference at any given time here at back4app, this block looks like how to use it? in this section, we are going to show you how to set an environment variable and use it on our cloud code the first step, what you need to is to access server settings server settings > environment variables environment variables > settings settings and set environment variables using key=value format please, put each variable in one line something like the example below to use it on your cloud code, you can test it following the guide below main js 1 parse cloud define("getenvironmentvariable", (request) => { 2 const node env = process env node env; 3 4 return `node env = ${node env}` 5 }); main js 1 parse cloud define("getenvironmentvariable", function(request, response) { 2 var node env = process env node env; 3 4 response success(node env); 5 }); to test it, you can use api console to call this cloud code function and test it