Install and configure beego framework under Mac

1. Install beego and bee

	$ go get -u github.com/beego/beego/v2
	$ go get -u github.com/beego/bee/v2

2. Configure environment variables

  • The terminal opens the directory where go is located

insert image description here

  • key in commandvim ~/.bash_profile
  • add configuration
	export GOPATH=${HOME}/go
	export PATH=${PATH}:${GOPATH}/bin
  • Save and exit to make the configuration take effect, typesource ~/.bash_profile
  • Enter bee versionto see if the installation configuration is successful

insert image description here

3. Create and test the beego project

  • Type the following commands in order to create your own project, "hello" can be replaced with your project name
$ cd $GOPATH/src
$ bee new hello
$ cd hello
$ bee run
  • bee new 「xxx」

insert image description here

  • bee run

insert image description here

Guess you like

Origin blog.csdn.net/QQ395879676/article/details/115444043