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
## Q. ***Explain the terms body-parser, cookie-parser, morgan, nodemon, pm2, serve-favicon, cors, .env, checksum, fs-extra, moment in Express JS?***
2547
2547
2548
-
**a) `body-parser`**
2548
+
**a) body-parser**
2549
2549
2550
2550
`body-parser` extract the entire body portion of an incoming request stream and exposes it on `req.body`. This body-parser module parses the JSON, buffer, string and URL encoded data submitted using HTTP POST request.
2551
2551
@@ -2580,7 +2580,7 @@ app.post('/api/users', jsonParser, function (req, res) {
2580
2580
})
2581
2581
```
2582
2582
2583
-
**b) `cookie-parser`**
2583
+
**b) cookie-parser**
2584
2584
2585
2585
A cookie is a piece of data that is sent to the client-side with a request and is stored on the client-side itself by the Web Browser the user is currently using.
2586
2586
@@ -2612,7 +2612,7 @@ app.get('/', function (req, res) {
2612
2612
app.listen(3000)
2613
2613
```
2614
2614
2615
-
**c) `morgan`**
2615
+
**c) morgan**
2616
2616
2617
2617
HTTP request logger middleware for node.js.
2618
2618
@@ -2643,7 +2643,7 @@ app.get('/', function (req, res) {
2643
2643
})
2644
2644
```
2645
2645
2646
-
**d) `nodemon`**
2646
+
**d) nodemon**
2647
2647
2648
2648
Nodemon is a utility that will monitor for any changes in source and automatically restart your server.
2649
2649
@@ -2665,7 +2665,7 @@ npm install -g nodemon
2665
2665
}
2666
2666
```
2667
2667
2668
-
**e) `pm2`**
2668
+
**e) pm2**
2669
2669
2670
2670
PM2[**P**(rocess) **M**(anager) **2**] is a production process manager for Node.js applications with a built-in load balancer. It allows to keep applications alive forever, to reload them without downtime and to facilitate common system admin tasks.
Node.js middleware for serving a favicon. The `serve-favicon` module lets us exclude requests for the favicon in our logger middleware. It also caches the icon in memory to improve performance by reducing disk access. In addition, it provides an `ETag` based on the contents of the icon, rather than file system properties.
0 commit comments