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…
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:
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.
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.