Commit 7526b9df authored by xiemengjun's avatar xiemengjun

增加入门文档和删除打开默认文档出错日志

parent 902acbb8
......@@ -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
......@@ -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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment