7 of 10 menu

Testing React Build via Local Static Server

Let's test our React build using a local static server running on NodeJS. To do this, we will use a special library serve.

Install it globally via npm:

npm install -g serve

While in the project folder, run the start command, where build is the name of the folder with the build (it can be different if you need):

serve -s build

After launch, our build will automatically open in a browser tab.

Test your build via the local static server.

fruzchuazcs