DEV Community

Cover image for How to Deploy Go Gin to China?
21CloudBox
21CloudBox

Posted on • Edited on • Originally published at 21cloudbox.com

1 1

How to Deploy Go Gin to China?

What is it Go Gin?

Gin is a web framework developed based on the Go language. It is an API like Martini, but the performance is said to be 40x better than Martini's.

21YunBox provides a very simple Gin project deployment method. You can deploy on the 21YunBox by using the Go operating environment.

How to Deploy a Go Gin Project to a Server?

  1. Register to become a 21YunBox member
  2. On Gitee Fork Go Gin launch template
  3. Create a Cloud Service on 21YunBox, and allow 21YunBox to access your code base
  4. Create with the following configuration
Environment Go
Build Command ./build.sh
Start command ./app

Click Advanced Configuration to configure environment variables:

KEY. VALUE Explanation
PORT 10000 21YunBox default read port 10000

Go Gin Startup Template is a real-time chat project implemented using Gin, using server-sent events (SSEs) to broadcast messages (not websockets).

When the deployment is successful, you can access the Gin project at app_id.21yunbox.com.

Alt Text Go Gin live chat example screenshot

Why Choose 21YunBox?

21YunBox is a Cloud Service Platform based out of Beijing, China. We specialize in modern web hosting and automation solutions. This enables you to set up websites instantly.

Have questions about hosting and deploying in China? Let us know, we are happy to help! hello@21YunBox.com

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



This article's content originated here

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

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Cloudinary image

Optimize, customize, deliver, manage and analyze your images.

Remove background in all your web images at the same time, use outpainting to expand images with matching content, remove objects via open-set object detection and fill, recolor, crop, resize... Discover these and hundreds more ways to manage your web images and videos on a scale.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay