Using React Hooks To Save the Environment

James Bradley Node.js, Programming, React Leave a Comment

Every application has some need for environmental variables that are specific to that environment. This can be database connections strings or URL to an API that will vary between the different environments. In React, you can use .env files to define key-value pairs. Then Node will inject these at runtime to be used globally through the process.env.{variable}. In this blog, …

React with Socket.IO Messaging App

Peter Le Development Technologies, Node.js, React 2 Comments

Building a messaging app sounds complicated, but it really isn’t. With the right tools, creating one might be simpler than you think. In this post, I will show you how to accomplish this task using Socket.IO. Before we dive in, let’s get some expectations out of the way. There will not be anything fancy in this app like different channels, …

JavaScript Shortcuts from a Seasoned Professional

Brian Jacobs JavaScript, Programming, Tutorial Leave a Comment

I’ve spent the past 15 years of my career working as a web developer. Over those years, I’ve learned and created various shortcuts to help ease development. So, I figured I’d share them with you. This short write up lists some of the JavaScript tips and tricks that I’ve picked up during my career.

The first snippet I’ll cover is one I’ve only used in a very specific, unique circumstance. It may not be relevant to all of you, but I wanted to share for the few it would apply to. The rest are snippets I use on nearly a daily basis. No matter your situation or requirements, you should be able to find at least one that you can adopt.

JSON Server to Mock API Servers: A Quick and Easy Solution

Todd Leininger Development Technologies, JavaScript, Testing, Tutorial Leave a Comment

I have found myself in the following scenario many times throughout my career. Everyone is ready to get the project started. You know what you are going to be working on, and as the frontend developer, you get started right away. You get to the point that you are ready to test your code to see how the API calls work. There’s one major thing in your way, though. The APIs aren’t done yet.

You could just create some static JSON files and read them in, but that doesn’t really test out calling an API. That’s where JSON Server swoops in to save the day. In this post, I’ll walk through how to use JSON Server. We’ll set up our environment, serve a simple JSON file, and generate mock data.