And note some fundamentals of Promise - When you create a new Promise, you're really just creating a plain old JavaScript object. This object can invoke two ...
Promise object is used for handling asynchronous computations which has some important guarantees that are difficult to handle with the callback method (the ...
Ans: Node.js uses a library called libuv, to bring an asynchronous event driven model to Javscript. It piggy backs on Chrome's Javascript Engine called V8 to ...
localStorage and sessionStorage both extend Storage. There is no difference between them except for the intended "non-persistence" of sessionStorage. That is, ...
Cookie-based authentication has been the default, tried-and-true method for handling user authentication for a long time. Cookie-based authentication ...
The pipe() function reads data from a readable stream as it becomes available, and writes it to a destination writable stream. It does all "reasonable" things ...
If you’ll recall, Express works with a request-response cycle in which callback functions are tied to specific routes and have access to request and response ...
The very basic steps of express-session and cookie-based session management The first time a browser makes a request to our server, express session generates ...
Passport is a framework, and a Node.js middleware, that is extremely flexible and modular. It allows you to work with the main authentication strategies: Basic ...
Explanation so, basically it removes all the create and start server code from your app.js and let you focus only on the application logic part. Note: If you ...
Since version 6.3, Node.js provides a built-in DevTools-based debugger which mostly deprecates Node Inspector, see e.g. this blog post to get started. The ...
localForage improves the offline experience of your web app by using asynchronous storage (IndexedDB or WebSQL) with a simple, localStorage-like API. Official ...
First note, in a typical node app, the token is generated with jsonwebtoken npm package using jwt.sign() function in the auth.js backend route or controller. ...
A JSON Web Token(JWT), defines an explicit, compact, and self-containing secured protocol for transmitting restricted informations. This is often used to send ...
We can speak about the graceful shutdown of our application, when all of the resources it used and all of the traffic and/or data processing what it handled ...
Ans: First, a classic use of callback methods. Second, using Promises. Finally, in a more sophisticated way, we can use reactive extensions (RxJS) to define ...
So you don't have to repeat same code over and over again. Node.js is a low-level I/O mechanism which has an HTTP module. If you just use an HTTP module, a lot ...
There are four main ways to deliver an error in Node.js: throw the error (making it an exception). pass the error to a callback, a function provided ...
A> https://medium.com/@alexishevia/using-cors-in-express-cac7e29b005b Cross-origin resource sharing (CORS) allows AJAX requests to skip the Same-origin ...
The cookie parser parses cookies and puts the cookie information on req object in the middleware. It will also decrypt signed cookies provided you know the ...
- « Previous Page
- 1
- …
- 4
- 5
- 6
- 7
- 8
- …
- 27
- Next Page »