Gatsby-- development environment to build
- Micro-channel scan code number of public attention: the front end of the front end of a large front-end , the pursuit of more refined reading experience, together to learn ah
- After Follow Send key information , free access to a complete set of front-end systems and learning materials old boy python courses
desc
Gatsby can be used to build static pages, build personal blog, the perfect combination React
Official website
Installation && initialization
-
Global Installation
npm install -g gatsby-cli
-
Initialize the project
gatsby new gatsby-site
, gatsby-site project name -
It can be directly used
npx gatsby new gatsby-site
, -
Note that if you use npx forms, windows system uses git bash, do not use cmd, cmd can not be executed git clone command
run
cd gatsby-site
gatsby develop
- The default port 8000 to run
View
- Open your browser and the local port 8000
- localhost: 8000 or 127.0.0.1:8000
Construct
- The above is the development environment, developers need to build complete it
gatsby build
- Static resource gatsby built a service for carrying build after
gatsby serve
- At this port is 9000