Skip to content

实现打包部署到服务器 #3

Description

@yaogengzhu

将go 项目打包成可执行的二进制文件

 CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build

在云端拉取二进制文件

./ginchat

可能会找不到配置文件,需要设置下路径信息

 CONFIG_PATH=/root/serve/ginchat/config ./ginchat&

& 表示可后台运行

查看当前运行的端口 如 8888

netstat -tuln | grep 8888

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions