Posts for node

Deven
Deven wrote

How to create and save schema array of strings in Mongoose

In this article, you will learn about how to create and save a schema array of strings in Mongoose. Mongoose is an ODM(Object Data Modeling) library for MongoDB and it lets you create a schema model and save documents in MongoDB. In the Mongoose schema model, you can create an array of strings. To create […]

January 13, 2022 in Code examples & Node
Deven
Deven wrote

Learn How to read and write file in NodeJS

NodeJS is very fast and highly scalable because of its event-driven, single-threaded and, non-blocking I/O model and you can do many interesting things by using it. Reading and writing files is one of them. It is a very essential functionality that is provided by NodeJS and the implementation of these things is very easy. You […]

December 28, 2021 in Node & Vue
Deven
Deven wrote

How to test async code in Mocha

In this article, you will learn how to test async code by using Mocha. Mocha is a JavaScript test framework that runs on Nodejs as well as in Browser. It is an open-source testing framework for JavaScript. In mocha, you can test your asynchronous JavaScript code. Let’s build an async function for the test with […]

December 2, 2021 in Code examples
Deven
Deven wrote

​​How to fix Node is not recognized

In this article, you will learn about how to fix node is not recognized. If you ever faced a problem like “node is not recognized as an internal or external command” after installing node.js. Don’t panic! It’s a common problem and its solution is very easy. You may face this kind of unwanted situation because […]

October 29, 2021 in Errors solved
Deven
Deven wrote

Node.js Express redirect example

HTTP Redirects are used to send users’ browsers to another page instead of the current one. There are 2 types of redirects, a 302 redirect which is considered temporary, and a 301 redirect which is considered permanent. The only difference between them is that the browser can cache and remember the 302 redirects so that […]

October 19, 2021 in Code examples
Deven
Deven wrote

Solve – the command npm exited with code 1

In this article, you will learn how to solve the command npm exited with code 1 error. In order to solve the error you can follow the steps below: Make the changes in in the .csproj file like below: to Now, Open Project folder and Update project angular-cli with this CMD command: and finally, Update visual […]

March 11, 2021 in Errors solved

Sending Emails With Vuejs and Nodemailer

Sending mails over the internet has become one of the most significant features every web application would love to integrate. In this article, we will see how to send email templates using Nodemailer as our transporter service, Handlebars, as our email templating engine. What We will be building We will build a simple application where […]

June 17, 2020 in Node & Tutorials & Vue

Setting Up Angular Authentication Using JWT

In this article, we will be building an authentication system in Angular using Expressjs, MongoDB, and JSON web token(JWT) for authentication.We will start by creating a simple REST API with Expressjs and MongoDB that will enable a user to signup and login with their details. Learning prerequisites Basic familiarity with Javascript. Basic Knowledge of Angular. […]

April 9, 2020 in Angular & Node & Tutorials
Deven
Deven wrote

Build a server monitoring app using Node & Angular

In this tutorial, we will build a Real-time server monitoring app using Node and Angular that will show the free memory available on our server. Take a look at the app we are going to build:  we will be using following tech stacks Vagrant Node.js Angular chart.js  To create our development server we will be […]

December 17, 2019 in Angular & Node & Tutorials

How to build a Twitter bot with NodeJs

Building a Twitter bot using their API is one of the fundamental applications of the Twitter API. To build a Twitter bot with Nodejs, you’ll need to take these steps below before proceeding: Create a new account for the bot. Apply for API access at developer.twitter.com Ensure you have NodeJS and NPM installed on your […]

December 2, 2019 in Javascript & Node & Tutorials