Skip to content

Commit 245cdab

Browse files
committed
Update README.md
1 parent 2542f0c commit 245cdab

File tree

1 file changed

+141
-43
lines changed

1 file changed

+141
-43
lines changed

README.md

Lines changed: 141 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
| 13. |[What is a test pyramid? How can you implement it when talking about HTTP APIs?](#q-what-is-a-test-pyramid-how-can-you-implement-it-when-talking-about-http-apis)|
2424
| 14. |[How can you secure your HTTP cookies against XSS attacks?](#q-how-can-you-secure-your-http-cookies-against-xss-attacks)|
2525
| 15. |[How can you make sure your dependencies are safe?](#q-how-can-you-make-sure-your-dependencies-are-safe)|
26-
| 16. |[What is Event loop in Node.js? And How does it work?](#q-what-is-event-loop-in-nodejs-and-how-does-it-work)|
26+
| 16. |[What is Event loop in Node.js? How does it work?](#q-what-is-event-loop-in-nodejs-how-does-it-work)|
2727
| 17. |[What is REPL? What purpose it is used for?](#q-what-is-repl-what-purpose-it-is-used-for)|
2828
| 18. |[What is the difference between Asynchronous and Non-blocking?](#q-what-is-the-difference-between-asynchronous-and-non-blocking)|
2929
| 19. |[How to debug an application in Node.js?](#q-how-to-debug-an-application-in-nodejs)|
30-
| 20. |[What are some of the most popular modules of Node.js?](#q-what-are-some-of-the-most-popular-modules-of-nodejs)|
30+
| 20. |[What are some of the most popular packages of Node.js?](#q-what-are-some-of-the-most-popular-packages-of-nodejs)|
3131
| 21. |[What is EventEmitter in Node.js?](#q-what-is-eventemitter-in-nodejs)|
3232
| 22. |[How many types of streams are present in node.js?](#q-how-many-types-of-streams-are-present-in-nodejs)|
3333
| 23. |[What is crypto in Node.js? How do you cipher the secure information in Node.js?](#q-what-is-crypto-in-nodejs-how-do-you-cipher-the-secure-information-in-nodejs)|
@@ -84,7 +84,7 @@
8484
| 74. |[How to use Q promise in node js?](#q-how-to-use-q-promise-in-node-js)|
8585
| 75. |[How to use locale (i18n) in node js?](#q-how-to-use-locale-i18n-in-node-js)|
8686
| 76. |[How to Implement Memcached in Nodejs?](#q-how-to-implement-memcached-in-nodejs)|
87-
| 77. |[Explain Error Handling in Nodejs?](#q-explain-error-handling-in-nodejs)|
87+
| 77. |[Explain Error Handling approaches in Nodejs?](#q-explain-error-handling-approaches-in-nodejs)|
8888
| 78. |[How to generate and verify checksum of the given string in Nodejs](#q-how-to-generate-and-verify-checksum-of-the-given-string-in-nodejs)|
8989

9090
<br/>
@@ -98,6 +98,14 @@ Node.js is an open-source server side runtime environment built on Chrome\'s V8
9898
<b><a href="#">↥ back to top</a></b>
9999
</div>
100100

101+
## Q. ***What are the benefits of using Node.js?***
102+
103+
*ToDo*
104+
105+
<div align="right">
106+
<b><a href="#">↥ back to top</a></b>
107+
</div>
108+
101109
## Q. ***What is Node.js Process Model?***
102110

103111
Node.js runs in a single process and the application code runs in a single thread and thereby needs less resources than other platforms. All the user requests to your web application will be handled by a single thread and all the I/O work or long running job is performed asynchronously for a particular request. So, this single thread doesn't have to wait for the request to complete and is free to handle the next request. When asynchronous I/O work completes then it processes the request further and sends the response.
@@ -181,6 +189,22 @@ node app.js
181189
<b><a href="#">↥ back to top</a></b>
182190
</div>
183191

192+
## Q. ***How to make an HTTP POST request using Node.js?***
193+
194+
*ToDo*
195+
196+
<div align="right">
197+
<b><a href="#">↥ back to top</a></b>
198+
</div>
199+
200+
## Q. ***How to execute an external program from within Node.js?***
201+
202+
*ToDo*
203+
204+
<div align="right">
205+
<b><a href="#">↥ back to top</a></b>
206+
</div>
207+
184208
## Q. ***What does the runtime environment mean in Node.js?***
185209

186210
The Node.js runtime is the software stack responsible for installing your web service\'s code and its dependencies and running your service.
@@ -197,6 +221,14 @@ The runtime environment is literally just the environment your application is ru
197221
<b><a href="#">↥ back to top</a></b>
198222
</div>
199223

224+
## Q. ***Explain usage of NODE_ENV?***
225+
226+
*ToDo*
227+
228+
<div align="right">
229+
<b><a href="#">↥ back to top</a></b>
230+
</div>
231+
200232
## Q. ***How do Node.js works?***
201233

202234
<p align="center">
@@ -232,6 +264,38 @@ Node JS Platform does not follow Request/Response Multi-Threaded Stateless Model
232264
<b><a href="#">↥ back to top</a></b>
233265
</div>
234266

267+
## Q. ***What is the difference between Node.js, AJAX, and JQuery?***
268+
269+
*ToDo*
270+
271+
<div align="right">
272+
<b><a href="#">↥ back to top</a></b>
273+
</div>
274+
275+
## Q. ***What are the core modules of Node.js?***
276+
277+
*ToDo*
278+
279+
<div align="right">
280+
<b><a href="#">↥ back to top</a></b>
281+
</div>
282+
283+
## Q. ***What is callback function in Node.js?***
284+
285+
*ToDo*
286+
287+
<div align="right">
288+
<b><a href="#">↥ back to top</a></b>
289+
</div>
290+
291+
## Q. ***What is EventEmitter in Node.js?***
292+
293+
*ToDo*
294+
295+
<div align="right">
296+
<b><a href="#">↥ back to top</a></b>
297+
</div>
298+
235299
## Q. ***What is an error-first callback?***
236300

237301
The pattern used across all the asynchronous methods in Node.js is called *Error-first Callback*. Here is an example:
@@ -561,7 +625,7 @@ The only option is to automate the update / security audit of your dependencies.
561625
<b><a href="#">↥ back to top</a></b>
562626
</div>
563627

564-
## Q. ***What is Event loop in Node.js? And How does it work?***
628+
## Q. ***What is Event loop in Node.js? How does it work?***
565629

566630
The event loop is what allows Node.js to perform non-blocking I/O operations — despite the fact that JavaScript is single-threaded — by offloading operations to the system kernel whenever possible.
567631

@@ -616,6 +680,14 @@ console.log("Program Ended.");
616680
<b><a href="#">↥ back to top</a></b>
617681
</div>
618682

683+
## Q. ***If Node.js is single threaded then how it handles concurrency?***
684+
685+
*ToDo*
686+
687+
<div align="right">
688+
<b><a href="#">↥ back to top</a></b>
689+
</div>
690+
619691
## Q. ***What is REPL? What purpose it is used for?***
620692

621693
REPL (READ, EVAL, PRINT, LOOP) is a computer environment similar to Shell (Unix/Linux) and command prompt. Node comes with the REPL environment when it is installed. System interacts with the user through outputs of commands/expressions used. It is useful in writing and debugging the codes. The work of REPL can be understood from its full form:
@@ -640,7 +712,7 @@ $ node
640712
<b><a href="#">↥ back to top</a></b>
641713
</div>
642714

643-
## Q. ***What is asynchronous programming in node js?***
715+
## Q. ***What is asynchronous programming in Node.js?***
644716

645717
*ToDo*
646718

@@ -715,16 +787,14 @@ Libraries that enhance stack trace information
715787
<b><a href="#">↥ back to top</a></b>
716788
</div>
717789

718-
## Q. ***What are some of the most popular modules of Node.js?***
790+
## Q. ***What are some of the most popular packages of Node.js?***
719791

720792
* **Async**: Async is a utility module which provides straight-forward, powerful functions for working with asynchronous JavaScript.
721-
* **Browserify**: Browserify will recursively analyze all the require() calls in your app in order to build a bundle you can serve up to the browser in a single <script> tag.
793+
* **Browserify**: Browserify will recursively analyze all the require() calls in your app in order to build a bundle you can serve up to the browser in a single `<script>` tag.
722794
* **Bower**: Bower is a package manager for the web. It works by fetching and installing packages from all over, taking care of hunting, finding, downloading, and saving the stuff you’re looking for.
723-
* **Backbone**: Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
724795
* **Csv**: csv module has four sub modules which provides CSV generation, parsing, transformation and serialization for Node.js.
725796
* **Debug**: Debug is a tiny node.js debugging utility modelled after node core\'s debugging technique.
726797
* **Express**: Express is a fast, un-opinionated, minimalist web framework. It provides small, robust tooling for HTTP servers, making it a great solution for single page applications, web sites, hybrids, or public HTTP APIs.
727-
* **Forever**: A simple CLI tool for ensuring that a given node script runs continuously (i.e. forever).
728798
* **Grunt**: is a JavaScript Task Runner that facilitates creating new projects and makes performing repetitive but necessary tasks such as linting, unit testing, concatenating and minifying files (among other things) trivial.
729799
* **Gulp**: is a streaming build system that helps you automate painful or time-consuming tasks in your development workflow.
730800
* **Hapi**: is a streaming build system that helps you automate painful or time-consuming tasks in your development workflow.
@@ -1297,6 +1367,46 @@ The `V8` was first designed to increase the performance of the JavaScript execut
12971367
<b><a href="#">↥ back to top</a></b>
12981368
</div>
12991369

1370+
## Q. ***What is chrome v8 engine?***
1371+
1372+
*ToDo*
1373+
1374+
<div align="right">
1375+
<b><a href="#">↥ back to top</a></b>
1376+
</div>
1377+
1378+
## Q. ***What is the purpose of using hidden classes in V8?***
1379+
1380+
*ToDo*
1381+
1382+
<div align="right">
1383+
<b><a href="#">↥ back to top</a></b>
1384+
</div>
1385+
1386+
## Q. ***How V8 compiles JavaScript code?***
1387+
1388+
*ToDo*
1389+
1390+
<div align="right">
1391+
<b><a href="#">↥ back to top</a></b>
1392+
</div>
1393+
1394+
## Q. ***What is V8 Templates?***
1395+
1396+
*ToDo*
1397+
1398+
<div align="right">
1399+
<b><a href="#">↥ back to top</a></b>
1400+
</div>
1401+
1402+
## Q. ***Why is LIBUV needed in Node JS?***
1403+
1404+
*ToDo*
1405+
1406+
<div align="right">
1407+
<b><a href="#">↥ back to top</a></b>
1408+
</div>
1409+
13001410
## Q. ***What is difference between put and patch?***
13011411

13021412
PUT and PATCH are HTTP verbs and they both relate to updating a resource. The main difference between PUT and PATCH requests are in the way the server processes the enclosed entity to modify the resource identified by the Request-URI.
@@ -1801,7 +1911,7 @@ It is an approach to connect the output of one stream to the input of another st
18011911
<b><a href="#">↥ back to top</a></b>
18021912
</div>
18031913

1804-
## Q. ***What is a control flow function? what are the steps does it execute?***
1914+
## Q. ***What is a control flow function? What are the steps does it execute?***
18051915

18061916
It is a generic piece of code which runs in between several asynchronous function calls is known as control flow function.
18071917

@@ -2114,6 +2224,14 @@ Node.js uses an event loop for this. An event loop is “an entity that handles
21142224
<b><a href="#">↥ back to top</a></b>
21152225
</div>
21162226

2227+
## Q. ***What are async functions in Node?***
2228+
2229+
*ToDo*
2230+
2231+
<div align="right">
2232+
<b><a href="#">↥ back to top</a></b>
2233+
</div>
2234+
21172235
## Q. ***Mention the steps by which you can async in Node.js?***
21182236

21192237
ES 2017 introduced Asynchronous functions. Async functions are essentially a cleaner way to work with asynchronous code in JavaScript.
@@ -2172,38 +2290,7 @@ addAsync(10).then((sum) => {
21722290

21732291
## Q. ***What are the timing features of Node.js?***
21742292

2175-
The Performance Timing API provides an implementation of the W3C Performance Timeline specification. The purpose of the API is to support collection of high resolution performance metrics. This is the same Performance API as implemented in modern Web browsers.
2176-
2177-
```javascript
2178-
const { PerformanceObserver, performance } = require('perf_hooks');
2179-
2180-
const obs = new PerformanceObserver((items) => {
2181-
console.log(items.getEntries()[0].duration);
2182-
performance.clearMarks();
2183-
});
2184-
obs.observe({ entryTypes: ['measure'] });
2185-
2186-
performance.mark('A');
2187-
doSomeLongRunningProcess(() => {
2188-
performance.mark('B');
2189-
performance.measure('A to B', 'A', 'B');
2190-
});
2191-
```
2192-
2193-
**`request` module**
2194-
The popular request module has a built-in method to measure HTTP timings. You can enable it with the time property.
2195-
2196-
```javascript
2197-
const request = require('request')
2198-
2199-
request({
2200-
uri: 'https://nodejs.org',
2201-
method: 'GET',
2202-
time: true
2203-
}, (err, resp) => {
2204-
console.log(err || resp.timings)
2205-
})
2206-
```
2293+
*ToDo*
22072294

22082295
<div align="right">
22092296
<b><a href="#">↥ back to top</a></b>
@@ -3351,13 +3438,24 @@ console.log(hashPwd); //ef5225a03e4f9cc953ab3c4dd41f5c4db7dc2e5b
33513438
<b><a href="#">↥ back to top</a></b>
33523439
</div>
33533440

3354-
#### Q. ***Explain Error Handling in Nodejs?***
3441+
#### Q. ***Is it possible to use "Class" in Node.js?***
3442+
#### Q. ***Explain Error Handling approaches in Node.js?***
3443+
#### Q. ***How would you handle errors for async code in Node.js?***
3444+
#### Q. ***What are the use cases for the Node.js "vm" core module?***
3445+
#### Q. ***Explain the concept of Domain in Node.js?***
3446+
#### Q. ***What is Node-API (N-API)?***
3447+
#### Q. ***Why Node.js is a single threaded language?***
33553448
#### Q. ***How to use locale (i18n) in Node.js?***
33563449
#### Q. ***What are the types of memory leaks in node.js***
33573450
#### Q. ***How to implement a Sleep function?***
33583451
#### Q. ***How does the cluster load balance work in node.js?***
33593452
#### Q. ***What is daemon process? how to implement it in node.js?***
33603453
#### Q. ***How to synchronize data between multiple clients on node.js server?***
3454+
#### Q. ***How do you convert an existing callback API to promises?***
3455+
#### Q. ***How would you scale Node application?***
3456+
#### Q. ***How to solve "Process out of Memory Exception" in Node.js?***
3457+
#### Q. ***How does the cluster module work? What is the difference between it and a load balancer?***
3458+
#### Q. ***Why do we need C++ Addons in Node.js?***
33613459

33623460
<div align="right">
33633461
<b><a href="#">↥ back to top</a></b>

0 commit comments

Comments
 (0)