Building React/Preact into a standalone script with Browserify

Browserify is a bundler that magically normalizes all your npm requirements into something a browser can understand. This means that your whole application can be minified into just 1 script that you can include in a regular HTML page.

Building React/Preact into a standalone script with Browserify Read More »

How to create a simple HTTP API with authentication with Node.js?

In this example we’ll see how to create an HTTP API with 3 main components: Signup, Login and a login-only route. Let’s start by setting up a new project and including Express for handling the routes, JSON Web Token to handle auto-expiring tokens, and bcrypt to encrypt user passwords. Initialize the new project in an empty folder. We’ll name the main file index.mjs to utilize top level awaits and have import/export functionality.

How to create a simple HTTP API with authentication with Node.js? Read More »