You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -305,7 +305,20 @@ The runtime environment is literally just the environment your application is ru
305
305
306
306
## Q. ***Explain usage of NODE_ENV?***
307
307
308
-
*ToDo*
308
+
NODE_ENV is an environment variable made popular by the express web server framework. When a node application is run, it can check the value of the environment variable and do different things based on the value.
309
+
310
+
For example, when we work on a project and there are production and development environments. We don't need to use caching in the development env. So we set
311
+
```bash
312
+
$ NODE_ENV=development
313
+
```
314
+
315
+
and use the code below
316
+
```js
317
+
if (process.env.NODE_ENV==='development')
318
+
useCaching =false;
319
+
```
320
+
Upon that, if the project runs on production it will use caching.
0 commit comments