1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-28 09:34:13 +00:00
Beego/README.md

50 lines
986 B
Markdown
Raw Normal View History

2012-03-05 14:20:28 +00:00
Beego
=======
Beego is an open source version of the scalable, non-blocking web server
2012-03-05 14:24:45 +00:00
and tools that power SNDA's CDN system. Documentation and downloads are
2012-03-30 15:50:13 +00:00
available at https://github.com/astaxie/beego
2012-03-05 14:20:28 +00:00
Beego is licensed under the Apache Licence, Version 2.0
(http://www.apache.org/licenses/LICENSE-2.0.html).
Installation
============
To install:
2012-03-30 15:50:13 +00:00
go install github.com/astaxie/beego
2012-03-05 14:24:45 +00:00
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