How to deploy a gin project to a server?

How to deploy a gin project to a server?

Screenshot of gin framework official website

What’s gin?

Gin is a web framework developed based on go language. It is a classMartiniAPI, but the performance is said to be Martini’s 40x.

The 21 cloud box provides a very simple gin project deployment method, which you can use on the 21 cloud boxGoIt is deployed by running the environment.

How to deploy the go gin project to the server??

  1. Register as21 cloud box members
  2. At gitee forkGo gin launch template
  3. Create one on the 21 cloud boxCloud servicesAnd allow 21 cloud boxes to access your code base
  4. Create with the following configuration
environment Go
Build command ./
Start command ./app

spotAdvanced configurationConfigure environment variables:

KEY VALUE explain
PORT 10000 21 cloud box default read port 10000

Go gin launch templateIs a real-time chat project implemented by gin, usingserver-sent events(SSEs) to broadcast messages (not WebSockets).

When the deployment is successful, you areapp_id.21yunbox.comAccess the gin project.

How to deploy a gin project to a server?

Go gin live chat example screenshot

Why 21 cloud box?

Operation and maintenance free!

21 cloud box build allows you to realize cloud deployment out of the box!

2 minutes online, agile team’s end-to-end web platform!

What is the difference between the 21 cloud box and these foreign cloud service platforms? Refer to:

Transferred from the official blog of cloud box 21:

Recommended Today

Could not get a resource from the pool when the springboot project starts redis; nested exception is io. lettuce. core.

resolvent: Find your redis installation path: Start redis server Exe After successful startup: Restart project resolution. ———————————————————————->Here’s the point:<——————————————————————- Here, if you close the redis command window, the project console will report an error. If you restart the project, the same error will be reported at the beginning, The reason is: It is inconvenient to […]