In this tutorial we’ll learn how to setup and send emails in Node with the Nodemailer package and Gmail SMTP. Whether you want to communicate with your users or just notify yourself when something has gone wrong, one of the best options for doing so is through email.

Thankfully Nodemailer makes the process extremely easy and we can setup our service and succesfully send emails in just a few lines of code.

Setup

We’ll start by first initializing our project and installing our dependencies — nodemailer and dotenv (you’ll want to move your email/password into environment variables)

npm init -y
npm install…

In this quick tutorial we will cover executing asynchronous JavaScript functions in parallel and the impact that can have on your code’s execution time.

The Problem

Let’s imagine we need to make a series of asynchronous function calls. This could include things like: API calls, timeouts, or reading/writing files if you’re using Node. To simulate the effect that running these requests in parallel can have we’ll just create a simple function that waits 2 seconds before resolving the Promise.

function makeRequest() {
return new Promise((resolve) =>
setTimeout(() => resolve({ status: 'done' }), 2000)
)
}

From there we will execute the request…


Source: https://nordicapis.com/building-a-restful-api-using-node-js-and-mongodb/

In this tutorial we will build a REST API with Node.js, Express, and Mongoose with full CRUD functionalities. First, we’ll start with a basic Express server. Next, we’ll add configuration for MongoDB, create a model with Mongoose and build out the controller with full CRUD functionality. Lastly, we’ll define the RESTful routes for handling our incoming requests and routing them to the proper controller action.

Getting Started

We’ll start by installing the following npm packages: express, mongoose, dotenv & nodemon as a DevDependency.

Next, we’ll setup our initial express server and create a simple route to test against.


In this tutorial, I’m going to give you a quick introduction to Redis. We’ll also use Redis to create a simple cache for a Node application to see how it impacts its performance.

What is Redis?

Redis is an open-source, in-memory data structure store used as a database, cache, and message broker.

You can think of it as a No-SQL database, which stores data as a key-value pair in the system memory. Redis supports disk-persistent data storage, too, if needed.

Redis has support for storing multiple data structures and data types , including strings, lists, hashes, sets, and sorted sets. …


Twilio Intro & Setup

Twilio is a powerful cloud communications platform which provides an interface for SMS, voice call utilities, answering machines, virtual phone lines, and more.

Today, we will be creating a very basic Rails 6 app that will send our new user’s a text via Twilio’s SMS API upon successful account creation. As it turns out, with only a few lines of code we can get up and running thanks to Twilio’s API.

Setup

  1. If you don’t already have a Twilio account, you can sign up for a free trial here. FYI — this gives each user $15.00 worth of credit to…

Vim is simply a text editor. The first screen-oriented text editor was Vi that created for the Unix environment; it was built for text manipulation. Vim is a popular text editor on Linux, which stands for ‘Vi Improved’. It is the clone of the Vi Unix text editor, and it supports more features than Vi.

You can write notes, reminders, emails in it. Though most of its users use it for editing source code files. What separates it is that while most editors focus on letting you write new text easily, Vim chooses to approach it from a radically different…


While learning JavaScript, I’ve made it an effort to maintain a list of every time-saving trick that I found in other people’s code, on code challenge websites, and anywhere other than the tutorials I was using. This post is intended to be useful for beginners, but I hope even intermediate JavaScript developers will find something new in this list.

1. Filter for Unique Values

The Set object type was introduced in ES6, and along with ..., the ‘spread’ operator, we can use it to create a new array with only the unique values.

const myArray = [1, 1, 1, 5, 3, 5]
const uniqArray = [...new…


Source: Traversy Media

Introduction

A JSON Web Token (JWT) is a JSON object that’s defined in RFC 7519 as a safe way to represent a set of information between two parties. The token is composed of a header, a payload, and a signature. JWT is used for authentication, and they can also be used for sharing information. Most JWT are signed using a public key and a private key; therefore, it’s very difficult to tamper with these tokens.

In authentication, when the user successfully logs in using their credentials, a JSON Web Token will be returned and must be saved locally (typically in local…


The Problem

DOM Manipulation is the heart of the modern, interactive web. Unfortunately, it is also a lot slower than most JavaScript operations.

This slowness is made worse by the fact that most JavaScript frameworks update the DOM much more than they have to.

As an example, let’s say that you have a list that contains ten items. You check off the first item. Most JavaScript frameworks would rebuild the entire list. That’s ten times more work than necessary! Only one item changed, but the remaining nine get rebuilt exactly how they were before.

Rebuilding a list is no big deal to…


Today, it’s nearly impossible to imagine a world without the internet. And the browser is our interface to the Web. It handles the retrieval, presentation, and traversal of this content. I think we all take for granted that when we push enter in our browsers address bar, magic happens.

But do you have any idea how this actually works? How does it turn a string of HTML into a data structure? Where do CSS & JavaScript come into play?

The main components of modern web browsers can be broken down into the following areas:

FETCH

Network Layer: responsible for fetching data…

Austin Buhler

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store