It feels so great when you buy a shirt, and while paying you find out another one is free. We all love free stuff, don’t we?
Now, when you’re just starting to build your website, do you really want to pay for hosting before you’ve even earned a single dollar from it? I know even wealthy people like you wouldn’t say no to free hosting 😂.
Luckily, there are several cloud platforms with free tiers. One of the best is Netlify.
Netlify is a platform to build, deploy, and manage modern web apps—and yes, you can deploy your React app there without paying a dime.
In this tutorial, I’ll show you how to do it. Don’t worry, I won’t be customizing the React app—we’ll stick with the boring default landing page. Why? Because I’m lazy 😪.
Steps:
- Open your workspace in Visual Studio Code.
- Open the terminal and create a new React App, using the command
npx create-react-app app-name
. - Go to your app folder and run the command
npm start
. React's default landing page should show up at http://localhost:3000. - Push your code to GitHub.
- Login to Netlify using Github account.
- Enter Signup Questions.
- From the List of Git providers select
GitHub
. - Select and authorise Netlify to access your repository.
- Start deploying your React project.
- Below command is used to build your project
- Once your build is successful your website will be published.
- If you haven't given any name to your website Netlify will generate a random name. You can click on the link and open your website.
- You can change the name of your website by navigating to Project Configuration-> Change Project Name.
- Now click on your website link and share your website.
Boom! Your React app is online. And you didn’t even have to touch a server, configure domains, or sell your kidney for hosting fees. Netlify did all the heavy lifting while you sat back lazy (respect ✌️).
Top comments (1)
Loved this! Super helpful and easy to understand.
Keep sharing such amazing content!💯