<aside> 💫 These instructions assume that you are using Vite or Create React App.

</aside>

Netlify is a service that allows us to deploy a static application. In a static application, what the browser gets does not change. We just need to serve some files as a response to the initial request — the html page (usually just the one!), any stylesheets, all the javascript needed to run the site, and any assets — and the application will run in the browser.

Netlify works by connecting with the GitHub repo that contains your application code. Netlify automatically deploys your application when you push to your main branch on GitHub — or, with our workflow, when you merge a pull request to the main branch.

Anytime the main branch changes on GitHub, that triggers a deploy on Netlify.

https://docs.netlify.com/site-deploys/create-deploys/

What you'll need

A Netlify account

It's free and you should not be asked to enter a credit card. Go to netlify.com and sign up. You can and should use your GitHub account to create a Netlify account. (Although If you don't use your GitHub account, or you already have a Netlify account created with an email address, that is fine.)

A front-end application with a package.json at the root

If you used Vite to create your application, your file structure might look something like this:

Screen Shot 2023-03-24 at 9.50.32 AM.png

If you ran Create React App, your file structure might look something like this:

Screen Shot 2021-09-22 at 11.45.39 AM.png

Start by creating a new application on Netlify

Look for the "Add new site" button on the right.

Screen Shot 2022-09-14 at 3.02.52 PM.png