Tag: Nodejs

Home » Posts Tagged "Nodejs"
Deploying a Simple Node.js Express App with Docker

Deploying a Node.js Express App with Docker

Docker simplifies the process to deploy a Node.js Express app by packaging it into a container. In this guide, we’ll show how to deploy deploy a Node.js Express app step-by-step using Docker. Prerequisites: Nodejs Docker   Step 1: Create the Node.js Express App First, initialize a basic Express app. If you haven’t already, install Node.js…

Read More

Log File Rotation in Node.js with Express

Log File Rotation in Node.js with Express

Log file rotation in Node.js is essential for managing log size and ensuring efficient monitoring of your application. In this guide, we will implement log file rotation in a Node.js application using Express and the winston and winston-daily-rotate-file packages.   Step 1: Set Up Express for Logging First, create a basic Express app: Initialize the…

Read More

winston logger in Nodejs

Winston Logger in Node.js with Express

Logging is essential for tracking application behaviour, debugging, and monitoring. Winston logger, a versatile logging library, simplifies logging in Node.js applications. It offers features like multiple transports, log levels, and customizable formats.   Step 1: Set Up Express First, create a basic Express app: Initialize the project:

Install Express:

Create an index.js file:…

Read More

bcrypt

Hash Passwords in Node.js

What is bcrypt? Bcrypt is a password hashing algorithm designed by Niels Provos and David Mazières based on the Blowfish cipher. The name “bcrypt” comprises two parts: “b” representing Blowfish and “crypt,” which denotes the hashing function utilized by the Unix password system. This blog will show you how to use bcrypt password hashing with the…

Read More