Deploy React Application in Netlify

October 9th, 2020 by

Netlify is a web development platform that can be used to host your React, Php, Python, Angular application.

In this tutorial, we are going to publish our React application in Netlify. We are not going to tackle how to create a React Application in this tutorial, but if you want to try, you can use this project created in React for testing.

 

Register to Netlify

The first step is to register an account here. You may use your Github / Gitlab account to signup.

Install The Netlify CLI

After registering, execute this command to install the Netlify CLI.

Build

You need to build your React application. Make sure you run the below commands.

This will create a React build folder that will be needed during deployment.

Deploy

If you have a React project/clone the test project above, cd to the project directory.
Execute the command below to deploy your application.

If you are asked to input the “Path to deploy”, select the build folder.

You will be redirected to an auth page so make sure you are logged in.

You will be asked to “Create & configure a new site” and the “Team Name”.

For the other fields, they are optional and you can leave them blank.

Visit Site

After deploying your application, Netlify will give you a link so you can visit the “Draft” site.

If all is good, deploy the app on your main site.

Specify the build folder again and visit your website.

 

Demo

https://festive-wright-3fafb8.netlify.app

 

Spread the love


Comments

Leave a Reply

Your email address will not be published.