js

image post

Dealing with concurrency in Node.js

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.

Read More →
image post

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

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

Read More →
image post

Detect if a string is a number with regex

How to know if a string is a number in JavaScript using a regular expression

Read More →
image post

Clean up more than two spaces and new lines with regex

A simple JavaScript method that removes all new lines and multiple spaces (including tab spaces) by a single space

Read More →
image post

Improve pg-promise stack traces

When you execute a query with error, we get a pg-promise internal module-specific stack trace.

Read More →
image post

pg-promise self signed certificate error in Postgres

If you are using Node.js with some of these packages: pg-promise or pg probably you are facing this issue.

Read More →
image post

How to connect to a Redshift database from Node.js

A util piece of code to connect to a Redshift database

Read More →
image post

Cache implementation in Node.js

A cached value it’s dynamic data, expensive to calculate, that we make it constant during a period of time.

Read More →
image post

Configure Prettier in your Node JS project

Prettier is a code formatter that supports many languages and can be integrated with most of the editors

Read More →
image post

How to configure http auth basic in Node js and Express

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

Read More →
image post

Full-text search in Node JS - search related data

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.

Read More →
image post

Better Queue in Node JS

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.

Read More →
image post

Optimizing Node JS code

At different levels you might optimize your JavaScript code. Sometimes optimization is a matter of good practices such as avoid using logging in loops.

Read More →
image post

Customize styles highlight.js

Customize styles highlight.js

Read More →
image post

Hash text in Node.js

Hash a string in Node.js without extra dependencies

Read More →
image post

Why I adopted Heroku

Heroku is a platform as a service (PaaS)

Read More →
image post

Upload big files to S3 using Node.js

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.

Read More →
image post

How to connect to a PostgreSQL database in Node.js

A simple example about how to connect to a PostgreSQL database using Node.js

Read More →
image post

Compress a file in Node.js

Zip a file in Node.js it's easy using zlib

Read More →
image post

How to configure HTTPS in Node.js

Sometimes we need to configure a secure environment locally to test how our application reacts to HTTPS.

Read More →
Search
Side Widget
You can put anything you want inside of these side widgets. They are easy to use, and feature the new Bootstrap 4 card containers!