beego orm current_timestamp_go mod 安装beego/bee

cbc62c258f8b80d322abe771a1ca63f5.png

一、创建一个 beego_env项目

mkdir beego_envcd beego_envgo mod init beego_env

二、替换 go.mod 内 的bee 源

fork github.com/beego/bee 到我自己的仓库 github.com/jinchunguang/bee

go.mod修改后的文件内容如下:

module beego_envreplace github.com/beego/bee v1.10.0 => github.com/jinchunguang/bee v1.12.1go 1.14

三、安装 beego 和 bee

go env -w GOPROXY=https://goproxy.cn,directgo get -u github.com/astaxie/beegogo get -u github.com/beego/bee

四、测试,我们在其他目录创建一个干净的项目 hello:

下面是我当前目录

$ pwd/d/SERVER

创建项目

bee new hello2020/07/24 15:08:39 INFO     ▶ 0001 generate new project support go modules.2020/07/24 15:08:39 INFO     ▶ 0002 Creating application...        create   D:SERVERhellogo.mod        create   D:SERVERhello        create   D:SERVERhelloconf        create   D:SERVERhellocontrollers        create   D:SERVERhellomodels        create   D:SERVERhelloouters        create   D:SERVERhelloests        create   D:SERVERhellostatic        create   D:SERVERhellostaticjs        create   D:SERVERhellostaticcss        create   D:SERVERhellostaticimg        create   D:SERVERhelloviews        create   D:SERVERhelloconfapp.conf        create   D:SERVERhellocontrollersdefault.go        create   D:SERVERhelloviewsindex.tpl        create   D:SERVERhellooutersouter.go        create   D:SERVERhelloestsdefault_test.go        create   D:SERVERhellomain.go2020/07/24 15:08:39 SUCCESS  ▶ 0003 New application successfully created!

运行项目:

bee run______| ___ | |_/ /  ___   ___| ___  / _  / _ | |_/ /|  __/|  __/____/  ___| ___| v1.11.02020/07/24 15:10:58 WARN     ▶ 0001 Running application outside of GOPATH2020/07/24 15:10:58 INFO     ▶ 0002 Using 'hello' as 'appname'2020/07/24 15:10:58 INFO     ▶ 0003 Initializing watcher...go: finding module for package github.com/shiena/ansicolorgo: found github.com/shiena/ansicolor in github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe966442020/07/24 15:11:05 SUCCESS  ▶ 0004 Built Successfully!2020/07/24 15:11:05 INFO     ▶ 0005 Restarting 'hello.exe'...2020/07/24 15:11:05 SUCCESS  ▶ 0006 './hello.exe' is running...2020/07/24 15:11:05.347 [I] [asm_amd64.s:1373]  http server Running on http://:8080

访问项目

70e12f6fde33a96db378737cc5c886a1.png

image.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值