diff --git a/README.md b/README.md index 02c78a4b..d2fcb25f 100644 --- a/README.md +++ b/README.md @@ -13,4 +13,37 @@ To install: go install github.com/astaxie/beego -go version: go1 release \ No newline at end of file +go version: go1 release + +Quick Start +============ +Here is the canonical "Hello, world" example app for beego: + + package main + + import ( + "github.com/astaxie/beego" + ) + + type MainController struct { + beego.Controller + } + + func (this *MainController) Get() { + this.Ct.WriteString("hello world") + } + + func main() { + beego.BeeApp.RegisterController("/", &MainController{}) + beego.BeeApp.Run() + } + +default port:8080 + + http get http://localhost:8080 + HTTP/1.1 200 OK + Content-Type: text/plain; charset=utf-8 + Date: Sat, 15 Dec 2012 16:03:00 GMT + Transfer-Encoding: chunked + + hello world diff --git a/beego.go b/beego.go index 6bb603d8..c92c750f 100644 --- a/beego.go +++ b/beego.go @@ -28,7 +28,7 @@ func init() { var err error AppConfig, err = LoadConfig(path.Join(AppPath, "conf", "app.conf")) if err != nil { - Trace("open Config err:", err) + //Trace("open Config err:", err) HttpAddr = "" HttpPort = 8080 AppName = "beego"