Authoradmin

Build a Command-Line App in Node.js with Yargs

B

Consider a circumstance where you’re building a terminal project using Node.js. One way to parse arguments would be to use the process.argv array, which is shown below: var myArgs = process.argv.slice(2); console.log("Your website name: ", myArgs[0]); console.log("Your favorite number", myArgs[1]); This will be the output: While this might work, there is a minor flaw with the...

Introduction of MongoDB in NodeJS

I

MongoDB Logo Introduction In this Introduction of MongoDB in NodeJS, you will learn the basics of MongoDB and how to connect to a MongoDB database in NodeJS. What is MongoDB MongoDB is a document-oriented database solution. It uses JSON-like documents with schema. These terms will be explained later.It’s has several advantages. Some of them are: It’s performant, fast and extremely scalable...

Middleware in Express nodejs

M

Previously, we learned about the fundamentals of Express. In this article, we will learn about middleware in Express NodeJS library and how to apply them in our code The Basic Idea: What’s Middleware? In layman terms, a web server is a function that inputs a request and outputs a response. Here, middlewares are functions executed in the middle after the incoming request, which then produces...

Routing in NodeJS with Express

R

Source: Source: Diego Jimenez on Unsplash Introduction to Express In this article you will learn about routing in NodeJS with Express. We will teach you the basics of Express and the NodeJS engine. What is routing? Routing is a method which tells how an application should respond to a client request at a particular path and a specific HTTP request method (GET, POST, PUT and so on).To put it...

Crud with Node.js and MongoDB (part 2)

C

For the second part of building a CRUD with Node.js and MongoDB, we will add each operation of the CRUD operation to our project one by one and will look at each step in detail. If you have not gone through the first part of this tutorial you can visit CRUD with Node.js and MongoDB (part 1). And now we will be going into more detail in this tutorial and will be focusing on the CRUD operations...

Redis with NodeJS tutorial

R

NodeJS is one of the most used Javascript backends in the market right now due to its ease of use and accessibility. In this Redis NodeJS tutorial, we will see how we can set up and use Redis with NodeJS. So, let us get started. What is redis and why do you need it? Redis is a popular data storage solution that works as a database, message broker, and cache. Due to its capability of storing the...

Node Package Manager

N

In this article, you will learn about the Node Package Manager. Node JS is based on Javascript and its main worth is due to the large number of packages bundled in it. To manage all these packages, a separate service help NPM helps to perform the following two main functionalities. Functionalities of NPM in Node JS Provides command-line utility to install/uninstall node packages. Management of...

Tutor Network