freeCodeCamp/guide/english/certifications/apis-and-microservices/basic-node-and-express/use-the--env-file/index.md

863 B

title
Use the .env File

Use the .env File

We can use the .toUpperCase() method to make a string all caps, such as:

  var response = "Hello World".toUpperCase(); // now becomes "HELLO WORLD"

All we need to do now is check what the value of the environment variable is, which you can do like:

   if (process.env.VAR_NAME === "allCaps") {
    resonse = "Hello World".toUpperCase();
   } else {
    response = "Hello World";
   }
  });

Help our community expand these hints and guides.