In JavaScript there are many options for making requests to external resources. You can use the built in XMLHttpRequest method. There’s also many libraries you can use such as jQuery and .ajax(), or you can also use Axios.

But in this post I will be talking about the new JavaScript fetch API. Please note this is only supported by newer versions of Chrome, Firefox, Edge, Safari, Opera, and is not supported by Internet Explorer at all. Which is why it might be a good idea to be using Babel with your JavaScript project if you’re not already.

First I’ll go…


There might be times when you’re developing a React app that you want to use environment variables. That may be because you don’t want the values of those variables being pushed to a repo that’s either public or for various other reasons. If you are using DotEnv there’s a couple more steps you have to take to get it working unlike if your using DotEnv in Node. In this short post I’m going to show you how to configure WebPack to make it work.

I usually use NPM for my projects but this should work with Yarn also because there…


Many times when I’m developing a web app I will need a backend and for that I will use Express. I like Express because it’s a framework that uses JavaScript and is for Node, so that makes it easy to set up. Sometimes though you might need Authentication with your Express app. In this post I’m going to show you how to do that using PostgreSQL for the database and Passport with the local strategy.

The repo for this post is located at https://github.com/craigstroman/express-boilerplate-auth.

To get started if you don’t already have a NPM project run the following command to…


When developing a React app you have some options for how to set up your environment. One of the easiest ways to create a React app is to use Create React App. But you might want to have your own custom setup using React and WebPack with DevServer. In this post I’ll show you how to set that up.

Now once you have a directory created for your project navigate to it using the terminal. Once you are in the project directory start a Node project if you haven’t already. You can do that by running the following command:

npm…

Recently I discovered a great code formatter for JavaScript called Prettier and fell in love with it. It’s great because it’s a very opinionated code formatter that can automatically format your code.

It can automatically update code like turning double quotes into single quotes or adjust indentation.These things are great especially for establishing consistency when working with multiple developers on a team.

Another great thing about Prettier is that it should work with all major code editors such as Atom, Microsoft Visual Studio, and WebStorm. …


Lately I’ve been developing a lot of React apps and I use Express for my backend. I realized I wanted to have hot module replacement (HMR) but most examples I found where using WebPack dev server.

After doing some research I discovered you can use hot module replacement with Express instead of just using WebPack dev server as your server. And since there weren’t that many sources when I was searching I figured I would write a blog post about how to do this.

To get Started, open up the terminal in your projects directory and run the following command…

Craig Stroman

I’m a front-end engineer who builds apps. http://www.craigstroman.com/

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