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

If you're building any kind of real API, this knowledge will serve you well.

Have questions or want a follow-up tutorial? Leave a comment or reach out—we’d love to help.

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

  const hexNum = BigNumber.from('0x12345');
  • From Another BigNumber:

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

Tutorial October 24, 2024

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.

Add the following code to your app.js file within the db.serialize() block, after the table creation:

PM2 Cheatsheet

Cheatsheet October 14, 2024

   pm2 set pm2-logrotate:max_size 10M
   pm2 set pm2-logrotate:retain 30
pm2 reload <app_name_or_id>