How to Deploy a Gatsby.js to China?
Tags: gatsby, react, javascript, china
Published: 2021-03-05 06:09:16

---
canonical_url: https://www.21cloudbox.com/solutions/deploy-gatsby-in-china.html
---
# What is Gatsby
[Gatsby or GatsbyJS](https://launch-in-china.21yunbox.com/blog/solutions/deploy-gatsby-in-china.html) is a modern website generator (SSG) based on [ReactJS](https://launch-in-china.21yunbox.com/solutions/how-to-deploy-reactjs-project-in-production-server.html), the popular framework originally from Facebook. It can be used to build blogs, e-commerce websites, web applications, and etc. Pairing GatsbyJS with a headless CMS such as [Contentful](https://launch-in-china.21yunbox.com/solutions/contentful-alternatives-in-china.html) enables marketing and technical teams to transform the overall digital experience.

21YunBox provides a very simple GatsbyJS deployment method. You can deploy with 21YunBox in the form of **static web pages**.


# How to Deploy GatsbyJS in China?
1. Register as [21YunBox member](https://www.21yunbox.com/u/signup/)
2. Fork [Gatsby Example](https://gitee.com/eryiyunbox-examples/gatsby)
3. Use the following method to configure

| Environment       | `Static webpage`         |
| ----------------- | :----------------------: |
| Build command     | **`yarn && yarn build`** |
| Release Directory | **`./public`**           |

If the description of the above text is not clear, please refer to the following  operation video example:
[How to Deploy GatsbyJS to a Server Example Video](https://www.bilibili.com/video/BV1SD4y1X7US)

# Why Choose 21YunBox?

> 21YunBox is a Cloud Service Platform based out of Beijing, China. Our services provides you with an easy and budget friendly, end-to-end web platform deployment service for all applications and stacks. No matter your need, we have a flexible solution to assist.
>
> If needed, we also offer [full support in obtaining your ICP license](https://launch-in-china.21yunbox.com/solutions/how-to-get-an-ICP-license-for-china.html) which allows you to legally host online content within Mainland China.


To learn about the differences between 21YunBox and these foreign (outside of China) cloud service platforms, please refer to:

* [21YunBox vs Heroku](https://launch-in-china.21yunbox.com/solutions/how-to-speed-up-heroku-in-china.html)
* [21YunBox vs Netlify](https://launch-in-china.21yunbox.com/blog/solutions/alternatives-to-netlify-in-china.html)
* [21YunBox vs Vercel](https://launch-in-china.21yunbox.com/solutions/how-to-speed-up-vercel-in-china.html)
* [21YunBox vs Gatsby Cloud](https://launch-in-china.21yunbox.com/solutions/how-to-speed-up-gatsby-cloud-in-china.html)
* [21YunBox vs Github Pages](https://launch-in-china.21yunbox.com/solutions/how-to-speed-up-github-pages-in-china.html)
* [21YunBox vs Surge.sh](https://launch-in-china.21yunbox.com/solutions/how-to-speed-up-surgesh-in-china.html)
* [Compare in terms of function and price: 21YunBox vs Heroku, Netlify, Vercel](https://www.21yunbox.com/compare-others/)

<br>
*This article's content originated [here](https://launch-in-china.21yunbox.com/solutions/how-to-deploy-gatsby-project-in-production-server.html)*

*For additional detail and future modifications, refer the original post.*