How to Make Surge.sh work in China?
Tags: surgesh, webdev, javascript, china
Published: 2021-03-08 16:15:56

---
canonical_url: https://www.21cloudbox.com/solutions/how-to-speed-up-surgesh-in-china.html
---
# What is Surge.sh?
Surge.sh is a command line (CLI) tool that provides hosting for static sites.

## Comparison Chart Before and After Speed Increase

Below are the speed test results for a site deployed  with Surge.sh in China:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hb679oq7zff56jwn1ph6.png)


Below are the speed test results for a site deployed  with 21YunBox in China.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1ghrqmrynuwuuqhy1tkf.png)

 The color represents the feedback time of the website, green represents fast, and the closer to red, it means extremely slow or even inaccessible.

As you can see, the access speed of the site **deployed with Surge.sh in China is very unsatisfactory** with most areas are very slow (orange).

After speeding up with 21YunBox, the result has reached a usable level.


## Source Code of the Test project

We chose a [Hexo Blog](https://gitee.com/eryiyunbox-examples/hello-hexo) as the test object. The default template was used, and no additional changes were made.


# How to Improve the Access Speed of Surge.sh in China?

Surge.sh does not support the function of online construction (packaging). You can store static sites in the storage space of domestic cloud service providers after packaging locally, such as AWS China S3 or Aliyun’s OSS, basically ensure the access speed of the website.

The disadvantages of deploying in the storage space are also very obvious: there are more initial configurations, if you want to make continuous deployment (Git push automatic packaging and deployment), you need more configuration.

If you want a hassle free solution in China that is as simple as Surge.sh and supports online packaging, you can host your site with [**21YunBox**](https://launch-in-china.21yunbox.com/).

## How to Host Static Sites with 21YunBox

#### 1. Register as a [21YunBox member](https://www.21cloudbox.com/u/signup/)

#### 2. Authorize 21YunBox to access the code repository you want to deploy

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sy4zpa5kc2tax4luhc5j.png)
*Sample image: Select the code repository to be deployed in 21YunBox*

#### 3. Configure Build (Package) Command and Release Directory


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fojmsvb32ktmbgfirog5.png) *Sample image: Configure Hexo build (package) command and release directory*

#### 4. Click "Deploy Now"
In moments, your site is packaged and deployed online.

You can access your project at `app_id.21yunbox.com` (`app_id` is created and defined).

#### If you are not sure how to set up, please watch the step by step example video below:
How to deploy [Hexo to the server example video](https://youtu.be/tF_tm7fskaU)

## What else can 21YunBox Deploy?
Like a back-end application framework [Python Django](https://launch-in-china.21yunbox.com/solutions/how-to-deploy-django-project-in-production-server.html) or [PHP Laravel](https://launch-in-china.21yunbox.com/solutions/how-to-deploy-laravel-project-in-production-server.html). This is notoriously complicated to deploy. The 21YunBox also allows you to complete the package and go online to generate a unique second-level domain name in 3 or 4 minutes.

What else? Want to know more? You can check [Help Document](https://www.21yunbox.com/docs/#/).

# 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-speed-up-surgesh-in-china.html)*

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