DeveloperBreeze

Nodejs Programming Tutorials, Guides & Best Practices

Explore 16+ expertly crafted nodejs tutorials, components, and code examples. Stay productive and build faster with proven implementation strategies and design patterns from DeveloperBreeze.

Build a Custom Rate Limiter in Node.js with Redis

Tutorial April 04, 2025

This isn’t just a quick fix—it’s a deep dive into:

  • Atomic operations with Redis
  • Manual request tracking logic
  • Flexibility to customize based on business rules

Understanding `crypto.randomBytes` and `ethers.randomBytes`: A Comparison

Tutorial October 24, 2024

Both crypto.randomBytes and ethers.randomBytes generate cryptographically secure random bytes, meaning the bytes are suitable for use in cryptographic applications such as key generation, encryption, and other security-sensitive operations.

  • Use crypto.randomBytes when:
  • You are building Node.js applications without blockchain-specific functionality.
  • You want to avoid adding external dependencies.
  • Use ethers.randomBytes when:
  • You are developing Ethereum-related applications and already have ethers.js in your project.
  • You want the flexibility of generating random bytes with minimal configuration, defaulting to 32 bytes for Ethereum addresses or private keys.

Working with `BigNumber` in ethers.js: A Guide for Version 6

Tutorial October 24, 2024

BigNumber supports a variety of arithmetic operations, including addition, subtraction, multiplication, and division. However, remember that BigNumber objects are immutable, meaning that every arithmetic operation returns a new instance.

  • Addition:

Connecting a Node.js Application to an SQLite Database Using sqlite3

Tutorial October 24, 2024

Connected to the SQLite database.
Table "accounts" created or already exists.

Now that the "accounts" table is set up, you can insert data into it. This process involves preparing an SQL statement and executing it with the desired values.

PM2 Cheatsheet

Cheatsheet October 14, 2024

pm2 reload all
pm2 start all