Files
Sudipto Ghosh 29823fe495 Expanded guides for some APIs and Microservices challenges and fixed links to the source files (#36131)
* Expanded the solution for the 'Get Route Parameter Input from the Client' challenge

* Expanded the guide for the 'Use body-parser to Parse POST Requests' challenge

* Rewritten guide for the 'Serve JSON on a Specific Route' challenge and fixed source link

* Expanded the guide for the 'Serve Static Assets' challenge

* Expanded solution to the 'Get Query Parameter Input from the Client' challenge and fixed links to source file

* Added solution to the 'Chain Middleware to Create a Time Server' challenge and fixed link to source file

* Rewrite the 'Start a Working Express Server' challenge

* Expanded the guide for 'Expand Your Project with External Packages from npm'

* Added reference to semantic versioning in 'Add a Version to Your package.json'

* fix/remove-links+fix-solutions

* fix/remove-more-links
2019-07-01 20:35:15 -05:00

25 lines
615 B
Markdown

---
title: Use the .env File
---
## Use the .env File
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
We can use the .toUpperCase() method to make a string all caps, such as:
```javascript
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:
```javascript
if (process.env.VAR_NAME === "allCaps") {
response = "Hello World".toUpperCase();
} else {
response = "Hello World";
}
});
```