Gatsby is a popular front-end framework that helps you create static apps and websites with React.
In this guide, we will show how you can set up your Gatsby project and deploy with Now in a few moments.
If you have not already set up a Gatsby project you can do so by first installing Gatsby CLI globally from your terminal:
npm i -g gatsby-cli
Then you can run the following command to create a Gatsby project locally:
gatsby new my-gatsby-project
Next, move into the directory from your terminal with
cd my-gatsby-project. You can see your new project in a local development environment by using the
npm develop command, set in the
package.json by Gatsby CLI.
With a Gatsby app set up, it is ready to deploy live with Now.
If you have not yet installed Now, you can do so by installing Now CLI.
Now allows you to deploy your project from the terminal with a single command:
If you want to deploy your Gatsby project when you push to a Git repository, you can use either Now for GitHub or Now for GitLab to have your project automatically deployed on every push, and aliased on push to master.