How to Deploy Go Gin Apps in China? (A Step-by-Step Guide)
How to Deploy Go Gin Apps in China? (A Step-by-Step Guide)


What is 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 Go Gin Apps with 21YunBox?

  1. Signup on 21YunBox
  2. On Gitee Fork Go Gin launch template
  3. Create a Cloud Service on 21YunBox, and allow 21YunBox to access your code base
  4. Use the following values during creation
Runtime 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.21cloudbox.com.

Go Gin live chat example screenshot
Go Gin live chat example screenshot



Ready to make your app work in China?

Get Started Questions? Talk to an expert.

Ready to try 21YunBox?

Get Started