Deploy Your App to Netlify

Deploy Your App to Netlify

Let’s now take your GitHub-hosted project live using Netlify, a popular and beginner-friendly hosting service for front-end apps.

Step 1: Build Your React App

In your terminal, run:

npm run build

This creates a new build/ folder with production-ready files. Make sure you run this command from the root of your weather app project (where package.json is located).

Step 2: Sign Up or Log in to Netlify

  1. Go to Netlify.com and create a free account or log in.
  2. Click "Add new site" → "Import an existing project".
  3. Choose GitHub and authorize Netlify to access your repositories.
  4. Select your react-weather-app repo.

Step 3: Configure Build Settings

Set these values:

Setting

Value

Build Commandnpm run build
Publish Directorybuild

Leave all other settings as default, then click Deploy Site.

Netlify will take a minute or two to build and deploy your app.

Step 4: Your Site Is Live

Once deployment is complete, Netlify will give you a random live URL like:

https://your-weather-site.netlify.app/

You can rename this URL:

  1. Go to your Site Settings on Netlify.
  2. Click Change site name and enter something like:
    guvi-weather-app-jaishree