15. NextJS Project
# Netlify Review
Netlify (opens new window) is another great hosting option with a generous free tier. It makes deploying your sites (React or otherwise) dead simple. Once configured, you can just push a new
commit to your main branch and Netlify will automatically run the build process and deploy your site.
# Set up continuous delivery
- Start a new netlify project (opens new window)
- Pick your Git hosting service and select your repository
- Click Build your site
# Support for client-side routing
To support pushState (i.e. with BrowserRouter), make sure to create a public/_redirects file with the following rewrite rules:
/* /index.html 200
That is a
_redirectsfile in yourpublicfolder.
When you build the project, Create React App will place the public folder contents into the build output and Netlify will correctly handle the redirects.
Remember
If you are publishing to Netlify, you should remove the gh-pages related changes to your package.json file.
This repo (opens new window) has notes in the README.md about the setup steps for Netlify and Github.
# Video Tutorials
Here is a series of 3 videos talking about how you can combine GitHub, Netlify, and Serverless. You are not required to use the Serverless Part.
Playlist of 3 videos about Netlify deployment (opens new window)
The individual video links are below.
Here is a tutorial on FreeCodeCamp about Netlify deployment (opens new window)
# Netlify Reference videos
# React Project
# What to do this week
TODO Things to do before next week.
- Work on the NextJS Project