Use async / await and avoid UnhandledPromiseRejection and crashes

Overview

You should be using the async and await keywords in your Node.js Express APIs. But did you know that Express handles error handling differently for fully synchronous code vs. asynchronous code?

Express does some magic to route errors to you error handling middleware, but you can run into issues with…


Recently, I’ve been working on a project called sapling.dev, which generates full stack JavaScript (node + React) apps, including full CRUD APIs, Auth0 and Stripe integrations, and more. …


Overview

When your Express API receives HTTP requests, how do you check whether the request is valid? Especially for POST and PUT requests, where you expect the request body to contain an entire object to process, how do you know whether it has the right fields and valid values?

In some…


ESLint, Prettier + VSCode

This is Part 2/2 in my series on setting up a minimal Node.js & Express project using Babel. Check out Part 1 here:

In Part 1, I set up Babel in a fresh Node / Express project, talked about Node versioning, set up scripts to use Babel for development and…


Let’s set up a basic Node.js / Express.js API that uses Babel. Babel will ‘transpile’ our ES2015+ code and module syntax to older-style code for compatibility purposes. …


Part 2

In my last post I reviewed some of the basics on Client Side Rendering (CSR) vs. Server Side Rendering (SSR). Check that out here if you’re unfamiliar:

Create React App was the example of a CSR app, and Next.js was the lead-in to the world of SSR. As noted, Next.js…


Part 1

Recently, I’ve been working more with Next.js. Its ability to help you pre-render your site on the server is really powerful. Before diving into any of the specifics on Next.js and its methodologies on pre-rendering, let’s take a step back and discuss basic Client Side Rendering vs. …

Nate Jones

Co-Founder @ nobos.co

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