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, dotenv, checksum, fs-extra, moment in Express JS?***
2546
+
## Q. ***Explain the terms body-parser, cookie-parser, morgan, nodemon, pm2, serve-favicon, cors, dotenv, fs-extra, moment in Express JS?***
2547
2547
2548
2548
**a) body-parser**
2549
2549
@@ -2784,6 +2784,29 @@ db.connect({
2784
2784
})
2785
2785
```
2786
2786
2787
+
**i) fs-extra**
2788
+
2789
+
`fs-extra` contains methods that aren\'t included in the vanilla Node.js fs package. Such as recursive `mkdir`, `copy`, and `remove`. It also uses graceful-fs to prevent `EMFILE` errors.
2790
+
2791
+
**Installation**
2792
+
2793
+
```bash
2794
+
npm install fs-extra
2795
+
```
2796
+
2797
+
**Usage**
2798
+
2799
+
```js
2800
+
constfs=require('fs-extra')
2801
+
2802
+
2803
+
// Async with callbacks:
2804
+
fs.copy('/tmp/myfile', '/tmp/mynewfile', err=> {
2805
+
if (err) returnconsole.error(err)
2806
+
console.log('success!')
2807
+
})
2808
+
```
2809
+
2787
2810
<divalign="right">
2788
2811
<b><a href="#">↥ back to top</a></b>
2789
2812
</div>
@@ -2916,7 +2939,8 @@ module.exports = router
2916
2939
#### Q. ***How to use Q promise in Node.js?***
2917
2940
#### Q. ***How to use locale (i18n) in Node.js?***
2918
2941
#### Q. ***How to implement Memcached in Node.js?***
2919
-
#### Q. ***Explain Error Handling in Node.js?***
2942
+
#### Q. ***Explain error handling in Node.js?***
2943
+
#### Q. ***How to generate and verify checksum of the given string in Node.js***
0 commit comments