How to start a Gatsby project
In order to start a Gatsby project, we need to install Gatsby’s CLI tool. Gatsby’s CLI is responsible for getting our Gatsby project up and running, including setting up a development server. In order for us to use the CLI tool, we need to install it via npm.
npm install -g gatsby-cli
Once installed, we have a couple options for starting a project. The first is to type the gatsby new command and press enter. From here you will be asked a multitude of questions ranging from the name of the directory that will hold your project to what CMS or content management you will be using such as WordPress. The second option, which we will be using, requires a starter project from Gatsby’s Starter Library.?
If we scroll down Gatsby’s starter site, and type Hello world, we should see two starter projects. A regular Javascript project and a Typescript project. Lets select the first for our purposes. To run this project, copy and paste the necessary npx command.
npx gatsby new gatsby-starter-hello-world https://github.com/gatsbyjs/gatsby-starter-hello-world
Once this command is executed, cd to your new project with your favorite editor and run npm start.You should now see hello world in your home page at localhost:8000!
Fractional Senior Software Engineer
3 年Link to video: https://www.dhirubhai.net/posts/devontae-moore-726556203_video-project-gatsbyjs-activity-6854060463781617664-cUny