Giter VIP home page Giter VIP logo

bee's Introduction

Beego Test Go Report Card Go Reference

Beego is used for rapid development of enterprise application in Go, including RESTful APIs, web apps and backend services.

It is inspired by Tornado, Sinatra and Flask. beego has some Go-specific features such as interfaces and struct embedding.

Quick Start

Kindly remind that sometimes the HTTPS certificate is expired, you may get some NOT SECURE warning

Web Application

Create hello directory, cd hello directory

mkdir hello
cd hello

Init module

go mod init

Download and install

go get github.com/beego/beego/v2@latest

Create file hello.go

package main

import "github.com/beego/beego/v2/server/web"

func main() {
	web.Run()
}

Download required dependencies

go mod tidy

Build and run

go build hello.go
./hello

Congratulations! You've just built your first beego app.

Features

Modules

Community

License

beego source code is licensed under the Apache Licence, Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0.html).

bee's People

Contributors

amrfaissal avatar askuy avatar astaxie avatar codeskyblue avatar dependabot[bot] avatar fanngyuan avatar flycash avatar franzwilhelm avatar frederic-zhou avatar gadelkareem avatar gnanakeethan avatar ihippik avatar lao-liu avatar lnzd avatar luhuisicnu avatar miraclesu avatar ogero avatar qida avatar rpsteinbrueck avatar s00500 avatar sergeylanzman avatar slene avatar taveek avatar tnextday avatar tossp avatar unknwon avatar wangle201210 avatar westonplatter avatar yitea avatar zhengyang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bee's Issues

bee api and exotic postgres types

hi,
I've got a postgres database with some exotic types such as uuid and interval. When i run bee api it fails.
What should i do to make it work ?

"bee run server.go" delete the orignal server.go and create a new binary server.go

I meant to input: go run server.go
instead,I inputed: bee run server.go

so,my server.go was replaced with a binary file server.go!!
I think it will be much better if there is a warnning before the bee tool "DELETE" the server.go !!!

++++++++++++++++++++++++++++++++++++++++++++++++++++++++
➜ /Users/wenke/go/src/wenke/websocket_server $bee run server.go
2015/04/16 15:50:52 [INFO] Initializing watcher...
2015/04/16 15:50:52 [TRAC] Directory(/Users/wenke/go/src/wenke/websocket_server)

2015/04/16 15:50:52 [INFO] Start building...
2015/04/16 15:50:53 [EVEN] "/Users/wenke/go/src/wenke/websocket_server/server.go": DELETE
2015/04/16 15:50:53 [SUCC] Build was successful
2015/04/16 15:50:53 [INFO] Restarting server.go ...
2015/04/16 15:50:53 [INFO] ./server.go is running...
2015/04/16 15:50:53 [INFO] Start building...
begin
can't load package: package wenke/websocket_server: read /Users/wenke/go/src/wenke/websocket_server/server.go: unexpected NUL in input
2015/04/16 15:50:53 [ERRO] ============== Build failed ===================
^C%

[Error]连接接postgresql数据库,生成api项目,运行的时候报错.no buildable Go source files in controllers

我使用的bee版本
# bee version bee :1.2.2 beego :1.4.1 Go :go version go1.3 linux/amd64

错误信息:
controllers目录下没有生成任何文件??

# bee run -gendoc=true -downdoc=true 2014/09/21 08:19:49 [INFO] Uses 'vshophub' as 'appname' 2014/09/21 08:19:49 [INFO] Initializing watcher... 2014/09/21 08:19:49 [TRAC] Directory(/root/projs/vshophub/proj/src/vshophub) 2014/09/21 08:19:49 [TRAC] Directory(/root/projs/vshophub/proj/src/vshophub/models) 2014/09/21 08:19:49 [TRAC] Directory(/root/projs/vshophub/proj/src/vshophub/routers) 2014/09/21 08:19:49 [INFO] Start building... 2014/09/21 08:19:49 [SUCC] generate successfully created! 2014/09/21 08:19:49 ============== generate docs =================== routers/router.go:11:2: no buildable Go source files in /root/projs/vshophub/proj/src/vshophub/controllers 2014/09/21 08:19:50 [ERRO] ============== Build failed =================== Downloading https://github.com/beego/swagger/archive/v1.zip to swagger.zip 157888 bytes downloaded. start to unzip file from swagger.zip to swagger Start delete src file swagger.zip

关于bee bale中ignore_ext的配置

一般的需要打包的就是html,js,css,png,jpg等等,都是可枚举
所以,ignore_ext改为inc_ext,应该会更好
要不很容易出现下面这种奇葩的东西
qq20140505012741

最后,是否能添加目录过滤比如.git,像我这种前端和服务器端分两个仓库的特别有用。。。。

bee new 与 run 应该在任何路径使用

我用windows系统,切换路径太麻烦.我希望BEE可以和REVEL一样在任何路径使用new,run命令,这样多方便.代码放在$GOPATH\src我不反对.但是我在其他路径就不能使用bee命令了,这个我认为应该改进.

在ben pack命令中我尝试加入-ldflags "-s -w"参数报错

我的命令是bee pack -b -ba="-v -x -ldflags \"-s -w\"" -be="GOARCH=amd64" -o ../ -f="zip"
去掉其中的-ldflags \"-s -w\"就正常了

build tsflow
GOOS windows GOARCH amd64
D:\Develop\Go\bin\go   build -o C:\Users\ttt\AppData\Local\Temp\beePack-2037585800\tsflow.exe -v -x -ldflags "-s -w"
invalid value "\"-s" for flag -ldflags: unterminated " string
usage: build [-o output] [build flags] [packages]

bee migrate无法连接slqite3

bee.json

{
  "database": {
    "driver": "sqlite",
    "conn": "./data/dev.db"
  }
}

显示如下:

2014/11/14 04:05:23 [INFO] Detected bee.json
2014/11/14 04:05:23 [INFO] Using 'sqlite' as 'driver'
2014/11/14 04:05:23 [INFO] Using './data/dev.db' as 'conn'
2014/11/14 04:05:23 [INFO] Running all outstanding migrations
2014/11/14 04:05:23 [ERRO] Could not connect to sqlite: ./data/dev.db

使用swagger时的错误

bee:1.2.2
beego:1.4.1
go:1.3.3 windows/amd64

问题1:
参考:http://my.oschina.net/astaxie/blog/284072

运行"bee run -gendoc=true -downdoc=true"后,swagger下载正常,控制台也提示了"Start delete src file swagger.zip",发现swagger.zip已解压但并没有删除.而且访问http://127.0.0.1:8080/swagger/swagger-1/,提示"Forbidden(403页)".

问题2:
参考:http://beego.me/docs/advantage/docs.md

按照docs.md尝试生成文档时,发现bee中没有"bee rundocs"命令

在windows上安装此插件失败

文件监视的库已经更改地址,原地址github.com/howeyc/fsnotify不能用,改为新的地址“gopkg.in/fsnotify.v0",执行go get github.com/beego/bee

Possible documentation error on PATH environment variable

I believe that in the documentation...

export PATH=$PATH:<your_main_gopath>/bin/bee

...should actually be

export PATH=$PATH:<your_main_gopath>/bin

or

export PATH=$PATH:$GOPATH/bin

At least, in my installation, there is no "bee" subdirectory - just the binary file.

It may also be useful to let users know that /etc/profile can be edited to make this a system-wide change.

bee command is unknown in Powershell

I tried to creat my first beego project. Window's Powershell didn't recognized the bee new projectName command, after I cloned the bee repo. As in the docs described, I switched to %GOPATH%/src and executed the command there. The %GOPATH% was setup successfully, since the import of other packages worked well.

How can I register the bee command in Windows?

generated code in wrong import path

$ bee new myprj
$ cd myprj ; bee run myprj

13-12-26 11:50:16 [INFO] Initializing watcher...
13-12-26 11:50:16 [TRAC] Directory(/home/dlin/go/src/myprj/controllers)
13-12-26 11:50:16 [TRAC] Directory(/home/dlin/go/src/myprj/models)
13-12-26 11:50:16 [TRAC] Directory(/home/dlin/go/src/myprj)
13-12-26 11:50:16 [INFO] Start building...
main.go:5:2: cannot find package "github.com/astaxie/beego" in any of:
/usr/lib/go/src/pkg/github.com/astaxie/beego (from $GOROOT)
/home/dlin/go/src/github.com/astaxie/beego (from $GOPATH)
13-12-26 11:50:16 [ERRO] ============== Build failed ===================
^C% 11:50:20 2 $ ls

$ grep -r astaxie

tests/default_test.go: "github.com/astaxie/beego"
main.go: "github.com/astaxie/beego"
routers/router.go: "github.com/astaxie/beego"
controllers/default.go: "github.com/astaxie/beego"
controllers/default.go: this.Data["Email"] = "[email protected]"

這代表 generate code 仍在 old import path

Bee test command not found

The "bee test" command is listed in the docs: http://beego.me/docs/install/bee.md#command-test
But it is not available when testing with the latest version of bee:

MacBook-Air-8:app $ bee version
bee :1.2.3
beego :1.4.2
Go :go version go1.3.3 darwin/amd64

MacBook-Air-8:app $ bee test
bee: unknown subcommand "test"
Run 'bee help' for usage.

MacBook-Air-8:app $ bee help
Bee is a tool for managing beego framework.

Usage:

bee command [arguments]

The commands are:

new         Create a Beego application
run         run the app and start a Web server for development
pack        Compress a beego project into a single file
api         create an API beego application
bale        packs non-Go files to Go source files
version     show the Bee, Beego and Go version
generate    source code generator
migrate     run database migrations

Use "bee help [command]" for more information about a command.

Additional help topics:

Use "bee help [topic]" for more information about that topic.

generateDocs - issue with assignment function with args causes wrong base path

Using bee generate docs or bee run -downdoc=true -gendoc=true and the following router.go code will cause the basepath value in docs/docs.go to be incorrect - which causes invalid urls when using swagger.

// @APIVersion 1.0.0
// @Title beego Test API
// @Description beego has a very cool tools to autogenerate documents for your API
// @Contact [email protected]
// @TermsOfServiceUrl http://beego.me/
// @License Apache 2.0
// @LicenseUrl http://www.apache.org/licenses/LICENSE-2.0.html
package routers

import (
        "fmt"

        "github.com/pabdavis/beeapi/controllers"

        "github.com/astaxie/beego"
)

func init() {
        fmt.Println("In router init")

        a := someFunction("wrong basepath")

        ns := beego.NewNamespace("/v1",
                beego.NSNamespace("/object",
                        beego.NSInclude(
                                &controllers.ObjectController{},
                        ),
                ),
                beego.NSNamespace("/user",
                        beego.NSInclude(
                                &controllers.UserController{},
                        ),
                ),
        )
        beego.AddNamespace(ns)
}

It appears that g_docs.go can incorrectly determine the basepath value if an assignment statement calls a function which has an argument (including "") appears before the NewNamespace function call.

160                             f, params := analisysNewNamespace(v)
161                             globalDocsTemplate = strings.Replace(globalDocsTemplate, "{{.version}}", f, -1)

I'll gladly submit a pull request if you have suggestion on how best to handle as I'm not 100% what required order or values are necessary within the router code - thanks

bee api 连接数据库创建文件失败

bee api -driver=mysql -conn="root:(127.0.0.1:3306)/test" 运行后出现创建文件失败
14-08-12 10:45:34 [INFO] Using 'mysql' as 'driver'
14-08-12 10:45:34 [INFO] Using 'root:@tcp(127.0.0.1:3306)/test' as 'conn'
14-08-12 10:45:34 [INFO] Using '' as 'tables'14-08-12 10:45:34 [INFO] Analyzing database tables...
14-08-12 10:45:34 [INFO] Creating model files...
14-08-12 10:45:34 [INFO] Creating controller files...
14-08-12 10:45:34 [INFO] Creating router files...
14-08-12 10:45:34 [ERRO] Could not write router file to /data/wwwroot/web/v3/src/test/routers/router.go

NFS support

I moved this ticket to howeyc/fsnotify#107

So, in case of this ticket, is it possible to send some signal/message/etc to bee api for run rebuild?

Create new application in another directory than $GOPATH/src

Hi !

When using bee new [app_name] with a custom directory, it returns me the following error :
Unable to create an application outside of $GOPATH
and tells me to create the application in $GOPATH/src, which works.

So, i wonder if it's possible to create app in custom directory, since it's not documented in the bee help command.

beego https的一个bug

在启用https关闭http的时候 bee run会默认显示Running on :8080 但是不能访问8080,可以访问https监听的端口。

bee 版本1.4.1

No controller files

Hello, First I would like to say thank you so much for this great work.
second I'm having this issue I'm not sure if its me or the tool but when I try to generate a CRUD api through the bee api cli command it works fine but no controller files
here is my input and output

../bin/bee api appname -tables="users,posts,comments" -driver=postgres -conn=postgres://user:[email protected]:5432/dbname?sslmode=disable

create app folder: /Users/me/gocode/src/appname
create conf: /Users/me/gocode/src/appname/conf
create controllers: /Users/me/gocode/src/appname/controllers
create docs: /Users/me/gocode/src/appname/docs
create tests: /Users/me/gocode/src/appname/tests
create conf app.conf: /Users/me/gocode/src/appname/conf/app.conf
create main.go: /Users/me/gocode/src/appname/main.go
2015/02/19 11:26:29 [INFO] Using 'postgres' as 'driver'
2015/02/19 11:26:29 [INFO] Using 'postgres://user:[email protected]:5432/dbname?sslmode=disable' as 'conn'
2015/02/19 11:26:29 [INFO] Using 'users,posts,comments' as 'tables'
2015/02/19 11:26:29 [INFO] Analyzing database tables...
2015/02/19 11:26:29 [INFO] Creating model files...
2015/02/19 11:26:29 [INFO] model => /Users/me/gocode/src/appname/models/users.go
2015/02/19 11:26:29 [INFO] model => /Users/me/gocode/src/appname/models/posts.go
2015/02/19 11:26:29 [INFO] model => /Users/me/gocode/src/appname/models/comments.go

2015/02/19 11:26:29 [INFO] Creating controller files...
2015/02/19 11:26:29 [INFO] Creating router files...
2015/02/19 11:26:29 [INFO] router => /Users/me/gocode/src/appname/routers/router.go

Thanks in advanced.

bee 工具在 $GOPATH 目录下执行,会报错,需要在 $GOPATH/src 目录下执行,说明文档有歧义。

localhost:mygocode ghj1976$ pwd
/Users/ghj1976/project/mygocode
localhost:mygocode ghj1976$ ls
bin pkg src
localhost:mygocode ghj1976$ bee new webtest1
14-04-19 07:41:43 [ERRO] Unable to create an application outside of $GOPATH(/Users/ghj1976/project/mygocode/)
14-04-19 07:41:43 [HINT] Change your work directory by cd ($GOPATH/src)
localhost:mygocode ghj1976$

这里的说明文档有歧义,建议修改:
http://beego.me/docs/install/bee.md

new 命令是新建一个 Web 项目,我们在命令行下执行 bee new <项目名> 就可以创建一个新的项目。但是注意该命令必须在 $GOPATH 下执行。最后会在 $GOPATH 相应目录下生成如下目录结构的项目:

bee new myproject

'bee test ...' should accept 'go test' flags and pass them through

I'm integrating 'bee' workflow into tools like 'gulp' or 'grunt', and it almost work, except 'bee test...' just run 'go test' without any arguments, while I have some basic needs:

  1. run 'go test' in verbose mode (with '-v' flag)
  2. run 'go test' on all sub-packages (with 'go test ./...')

As long as these are specific needs, I think a better and more general approach is to have 'bee test' pass extra flags directly to 'go test', then 'bee test app -v ./...' invokes 'go test -v ./...'.
Another approach is to add an extra field in 'bee.json'. But in a automated workflow, command line arguments are far more friendly than configuration files. So a command line based solution is better.

How do you think about this?
If this approach is acceptable, I'll implement it and send a pull request.

bee can not found my GOPATH

While I did not encounter any problems before.
Logs:

env
GOPATH=/nfs/zfs-student-4/users/2013/mweibel/Dropbox/rendu/goproj
pwd
/nfs/zfs-student-4/users/2013/mweibel/Dropbox/rendu/goproj/src
bee new hop
2015/05/08 16:31:38 [ERRO] Unable to create an application outside of $GOPATH(/nfs/zfs-student-4/users/2013/mweibel/Dropbox/rendu/goproj)

if I give it myself the GOPATH with the env command it works:

env GOPATH=/nfs/zfs-student-4/users/2013/mweibel/Dropbox/rendu/goproj/src bee new framework0
[INFO] Creating application...

I'm using zsh with omzsh

Can not set arguments when use bee run

Hi team,
When i used bee run, I can not set more arguments. But I use go run in same project, it worked.

Example:

var runMode = flag.String("runmode", "dev", "run mode dev/prod")

func main() {

    flag.Parse()
    fmt.Println(*runMode)

    if beego.RunMode == "dev" {
        beego.DirectoryIndex = true
        beego.StaticDir["/swagger"] = "swagger"
    }

    beego.Run()
}

bee run appName -runmode=prod
It will print dev

go run main.go -runmode=prod
It will print prod

How to set arguments which mode bee run and go run ?

是否可以默认把的那两个swagger的json变量作为可导出的

bee docs命令执行过后会生成一个docs.go的文件,生成给swagger的参数。

这里:

var rootinfo string = {{.rootinfo}}
var subapi string = {{.subapi}}

可不可以修改为?

const (
    Rootinfo string = {{.rootinfo}}
        Subapi string = {{.subapi}}
)

subapi 和rootinfo 这两个变量的内容,经过整理以后,可以直接初始化为RBAC的资源列表或者也可以演绎出一些其他的用处,感觉挺好的。

Best practice with bower_components

I use Bower to use my dependencies in my beego app. The /static directory already contains a structure for imgs, css etc. Bower stores usually the files of each dependencie e.g. Bootstrap 3 in /bower_components, but this behavior would break the default folder structure of beego?

Has anyone a good idea to combine both?

bee new,如果目录存在,会直接退出

bee new,如果目录存在,会直接退出。

我觉得如果加一个参数 -f ,如果目录存在,继续执行。会比较好。

场景:我从 github clone 一个新项目下来。已经存在目录了,我想在这个目录下 bee new 做初始化。

Suggestion: "bee new" return os.Exit(1) when successful

bee new myprj dlin@u40 ~/go/src$
[INFO] Creating application...
/home/dlin/go/src/myprj/
/home/dlin/go/src/myprj/conf/
/home/dlin/go/src/myprj/controllers/
/home/dlin/go/src/myprj/models/
/home/dlin/go/src/myprj/routers/
/home/dlin/go/src/myprj/tests/
/home/dlin/go/src/myprj/static/
/home/dlin/go/src/myprj/static/js/
/home/dlin/go/src/myprj/static/css/
/home/dlin/go/src/myprj/static/img/
/home/dlin/go/src/myprj/views/
/home/dlin/go/src/myprj/conf/app.conf
/home/dlin/go/src/myprj/controllers/default.go
/home/dlin/go/src/myprj/views/index.tpl
/home/dlin/go/src/myprj/routers/router.go
/home/dlin/go/src/myprj/tests/default_test.go
/home/dlin/go/src/myprj/main.go
13-12-26 11:43:15 [SUCC] New application successfully created!
And it return error code '2'

go get 安装报错

src/github.com/astaxie/beego/logs/log.go:63: function ends without a return statement
src/github.com/astaxie/beego/logs/log.go:76: function ends without a return statement

github.com/astaxie/beego/config

src/github.com/astaxie/beego/config/json.go:40: function ends without a return statement
src/github.com/astaxie/beego/config/json.go:54: function ends without a return statement
src/github.com/astaxie/beego/config/json.go:67: function ends without a return statement
src/github.com/astaxie/beego/config/json.go:80: function ends without a return statement
src/github.com/astaxie/beego/config/json.go:93: function ends without a return statement

符号链接目录问题

在创建app的时候 wg, _ = path.EvalSymlinks(path.Join(wg, "src"))这行代码不知道为何要找到真实路径,难道符号链接的路径不允许吗? 这个问题搞了我好久, 因为mac上的/tmp目录是/private/tmp 的一个符号链接, 我喜欢试验一些东西的时候去/tmp目录测试,结果一直报不在GOPATH里,我觉得这个地方应该两种情况都允许.

bee test can not work well.

測試 apiprj

失敗

$ bee test apiprj
[INFO] Initializing watcher...
[TRAC] Directory(/home/dlin/go/src/apiprj/controllers)
[TRAC] Directory(/home/dlin/go/src/apiprj/models)
[TRAC] Directory(/home/dlin/go/src/apiprj)
[INFO] Start building...

apiprj/controllers

controllers/default.go:25: invalid operation: this.Controller.Ctx.Input.Param[":objectId"](index of type func%28string%29 string)
controllers/default.go:41: invalid operation: this.Controller.Ctx.Input.Param[":objectId"](index of type func%28string%29 string)
controllers/default.go:55: invalid operation: this.Controller.Ctx.Input.Param[":objectId"](index of type func%28string%29 string)
[ERRO] ============== Build failed ===================

測試 myprj

雖成功但不會自動脫離,無法作 batch test.

$ cd ../myprj
$ bee test myprj
[INFO] Initializing watcher...
[TRAC] Directory(/home/dlin/go/src/myprj/controllers)
[TRAC] Directory(/home/dlin/go/src/myprj/models)
[TRAC] Directory(/home/dlin/go/src/myprj)
[INFO] Start building...
[SUCC] Build was successful
[INFO] Restarting myprj ...
[INFO] Start testing...
2013/12/26 11:27:02 [I] Running on :8080
[TRAC] ============== Test Begin ===================
? myprj [no test files]
[TRAC] ============== Test End ===================
[SUCC] Test finish
此處要手動按 ctrl-c

自动化文档生成

// @success 200 {object} controllers.Response

这个 controllers.Response 如果不是struct, 就生成不了.

// @success 200 {object} map[string]string

这个也不行.

// @success 200 {object} map[string]controllers.Response

type Response struct {
      A int
}

这个也一样不行.

API Swagger Annotation with different request / response models

I'm experiencing an issue with the generated Swagger docs when my controller is annotated to return a different object type than the request body type.

Consider (when @param and @success objects are both NewUserRequest):

// @Title Test
// @Description Test
// @Param body body models.users.NewUserRequest true "User"
// @Success 200 {object} models.users.NewUserRequest
// @Failure 400 auth
// @router /test [post]
func (this *PublicServicesController) Test() {

}

Swagger UI looks like:

swagger_1

Now, if I change the @success object to NewUserResponse model:

// @Title Test
// @Description Test
// @Param body body models.users.NewUserRequest true "User"
// @Success 200 {object} models.users.NewUserResponse
// @Failure 400 auth
// @router /test [post]
func (this *PublicServicesController) Test() {

}

I get a broken request data type model in Swagger UI:

swagger_2

Am I using this incorrectly or is this unexpected behavior?

mac 在安装Bee的时候提示出错

beego 可以正常安装的,但Bee 工具安装的时候 必须 sudo .
但即使sudo ,却提示 没有设置“GOPATH”
[apple@pc-201009121709 bee]$echo $GOPATH
/Users/apple/work/gopath
[apple@pc-201009121709 bee]$sudo go get github.com/beego/bee
package github.com/beego/bee: cannot download, $GOPATH not set. For more details see: go help gopath
[apple@pc-201009121709 bee]$

重复编译的问题

关于热升级 watch.go中有对于重复编译的控制 1秒延时
但是这我这边一侧还是出现了反复编译的问题
我的升级方法是一个代码压缩包直接unzip
然后从日志看到bee工具还是反复编译了11次
就是我这批文件的数量

我已经fork这个项目,稍候看看这个要怎么改

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.