This project is maintained by mantejjosan
If you’ve built a React app and want to share it with your teammates so they can access it online instead of running it on your local machine, follow this guide. We’ll use Vercel, a hosting platform specifically designed for modern web apps, to deploy your React app.
Before deploying, you need to build a production-ready version of your React app.
npm run build
build/
containing all the necessary files for deployment.Now that your app is built, let’s deploy it to Vercel. Here are the detailed steps to get your React app live:
Go to vercel.com and sign up for a free account. You can sign up using your GitHub, GitLab, or Bitbucket account.
Once you’re signed in, install the Vercel CLI by running the following command in your terminal:
npm install -g vercel
This allows you to deploy directly from your terminal.
vercel
your-app-name.vercel.app
).Enter
if your code is in the root directory (where your package.json
is located).Enter
.build
since that’s where your production files are stored.After answering all the questions, Vercel will start deploying your app. You’ll see some output in the terminal as it builds and uploads your files to Vercel’s servers.
Once the process is complete, Vercel will provide you with a live URL where your app is hosted. It will look something like:
https://your-app-name.vercel.app
Your app is now live on the web! Share the provided URL with your teammates, and they’ll be able to access it from any device.
Whenever you make updates to your React app, you can deploy the changes by simply running the vercel
command again in your project’s root folder:
vercel
Vercel will handle the redeployment, and your live app will be updated automatically.
vercel.app
URL, you can easily set it up via the Vercel dashboard.