Tag Archives: Node.js

Node.js – Async/Await

By | 04/05/2022

In this post, we will see how to use Async/Await in Node.js for working in asynchronous mode in the easiest way.It has been introduced from ES2017 to solve the complexities we can find using Promises. For example, if we want to create a method to calculate the square of a number, using Promises, this is… Read More »

Node.js – How to connect to MySQL

By | 04/03/2020

In this post, we will see how to connect a Node application with the MySQL Db called “DbManagerUser”, created in the post: MySQL – How to create a DB. First of all, we open Visual Studio Code, we open a terminal and we install the MySQL Module, using the command npm install mysqlThen, we create an… Read More »

Node.js – How to use pipe()

By | 07/01/2020

In this post, we will see how pipe works and how we can use it. First of all, what is a pipe?The pipe() function reads data from a readable stream as it becomes available and writes it to a destination writable stream.In the previous post Node.js – Streams, we have read a file and we… Read More »

Node.js – Streams

By | 27/11/2019

From internet:“Streams are a way to handle reading/writing files, network communications, or any kind of end-to-end information exchange in an efficient way.What makes streams unique, is that instead of a program reading a file into memory all at once like in the traditional way, streams read chunks of data piece by piece, processing its content without keeping… Read More »