image post

Better Queue in Node JS

Move heavy processing task to background with better-queue module in Node.js
Aug 03, 2020
A good practice in software development is to delegate as much heavy work as possible to background jobs to avoid blocking the main execution of your application that can be a web app, mobile app, or desktop.

image post

How to configure HTTPS in Node.js

See how to setup a secure environment in our local machine to test HTTPS
Jul 27, 2020
Sometimes we need to configure a secure environment locally to test how our application reacts to HTTPS.

image post

Compress a file in Node.js

Jul 27, 2020
Zip a file in Node.js it's easy using zlib

image post

Hash text in Node.js

Hash a text using native crypto module in Node JS. No extra dependencies.
Aug 02, 2020
Hash a string in Node.js without extra dependencies

image post

Upload big files to S3 using Node.js

Stream big files from disk and upload them to AWS S3 bucket using chunks
Jul 29, 2020
Sometimes you need to upload a big file, let say bigger than 100MB. Stream from disk must be the approach to avoid loading the entire file into memory.

image post

How to connect to a PostgreSQL database in Node.js

Connect to Postgres database in Node js using pg and parse-database-url packages
Jul 28, 2020
A simple example about how to connect to a PostgreSQL database using Node.js

image post

How to use a GitHub repository as a dependency in Node.js

Aug 30, 2020
Sometimes you need a dependency that is not published as a regular package at npmjs.com

image post

Optimizing Node JS code

Small actions that may generate big impact in your performance
Aug 03, 2020
At different levels you might optimize your JavaScript code. Sometimes optimization is a matter of good practices such as avoid using logging in loops.

image post

Dealing with concurrency in Node.js

Yeap, race condition is present also in Node.js regardless the single thread Event Loop
Aug 30, 2020
Even though the Event Loop is a single thread we have to take care of race condition since 99% of our code will run in a non main thread.

image post

Full-text search in Node JS - search related data

Search related content using FlexSearch package for Node.js. See an implementation example with Express framewrok
Aug 04, 2020
If you are building a website, e-commerce, a blog, etc., you will need a full-text search to find related content like Google does for every web page.

image post

How to configure http auth basic in Node js and Express

Aug 04, 2020
Let’s build a small site in Node.js using Express that will have one protected page

image post

Cache implementation in Node.js

A custom cache implementation to show how Promises powerful are
Aug 08, 2020
A cached value it’s dynamic data, expensive to calculate, that we make it constant during a period of time.

image post

How to connect to a Redshift database from Node.js

See how to use pg-promise to connect to a AWS Redshift database
Aug 11, 2020
A util piece of code to connect to a Redshift database

image post

How to download a Salesforce file from Node.js

A JavaScript snippet to download a Salesforce file using the Rest API
Apr 20, 2021
Download a file from Salesforce using Node.js

image post

Configure Prettier in your Node JS project

How to configure Prettier to format your code as It was written by only one developer
Aug 08, 2020
Prettier is a code formatter that supports many languages and can be integrated with most of the editors

image post

Download and save a file in Node.js

Get a file from a server and store it in your disk
May 13, 2021
Download a file in Node.js is pretty straightforward. We are going to make an implementation using native modules. No third parties.