记录 GO 及 Beego 框架安装及基础配置

安装 Go

/usr/local/go
vim ~/.bash_profile

1 2 3 4 5 6 7 8

# golang export GOROOT=/usr/local/go export GOBIN=$GOROOT/bin export PATH=$PATH:$GOBIN export GOPATH=$HOME/go export GOPROXY=https://goproxy.cn # Go work bin export PATH=$PATH:$GOPATH/bin

安装 Beego

go mod init 

安装 bee

darwin_arm64bee update
go install

1

go install github.com/beego/bee/v2@latest

$GOPATH/binbee

检验 bee 工具是否安装成功:

1

bee version

创建一个新的 Beego 项目

1 2 3 4

bee new hello cd hello go mod tidy bee run