1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-16 18:00:54 +00:00
Beego/docs/en/README.md

61 lines
1.8 KiB
Markdown
Raw Normal View History

2013-06-21 08:35:46 +00:00
# Beego
2013-04-19 02:31:20 +00:00
Beego is a lightweight, open source, non-blocking and scalable web framework for the Go programming language. It's like tornado in Python. This web framework has already been using for building web server and tools in SNDA's CDN system. Documentation and downloads available at [http://astaxie.github.com/beego](http://astaxie.github.com/beego)
It has following main features:
2013-04-12 04:35:10 +00:00
- Supports MVC model, you only need to focus on logic and implementation methods.
- Supports websocket, use customized handlers to integrate sockjs.
- Supports customized router rules, including regex and semanteme.
- Session integration, supports memory, file, redis, mysql, etc.
- Automated parsing user form, you can get data very easy.
- Log level system, easy to record debugging and deployment logs.
- Use configuration file (.ini) to customized your system.
2013-04-12 04:38:15 +00:00
- Use built-in templates in Go, and it provides much more useful functions which are commonly used in web development.
2013-04-12 04:35:10 +00:00
2013-04-19 02:31:20 +00:00
The working principles of Beego as follows:
2013-04-12 04:35:10 +00:00
![](images/beego.png)
2013-04-11 16:01:25 +00:00
Beego is licensed under the Apache Licence, Version 2.0
(http://www.apache.org/licenses/LICENSE-2.0.html).
2013-06-21 08:35:46 +00:00
# Simple example
2013-04-19 02:31:20 +00:00
The following example prints string "Hello world" to your browser, it shows how easy to build a web application with Beego.
2013-04-11 16:01:25 +00:00
2013-04-19 02:31:20 +00:00
package main
2013-06-21 08:35:46 +00:00
2013-04-19 02:31:20 +00:00
import (
2013-06-21 08:35:46 +00:00
"github.com/astaxie/beego"
2013-04-19 02:31:20 +00:00
)
2013-06-21 08:35:46 +00:00
2013-04-19 02:31:20 +00:00
type MainController struct {
2013-06-21 08:35:46 +00:00
beego.Controller
2013-04-11 16:01:25 +00:00
}
2013-06-21 08:35:46 +00:00
2013-04-19 02:31:20 +00:00
func (this *MainController) Get() {
2013-06-21 08:35:46 +00:00
this.Ctx.WriteString("hello world")
2013-04-11 16:01:25 +00:00
}
2013-06-21 08:35:46 +00:00
2013-04-19 02:31:20 +00:00
func main() {
2013-06-21 08:35:46 +00:00
beego.Router("/", &MainController{})
beego.Run()
2013-04-19 02:31:20 +00:00
}
2013-04-11 16:01:25 +00:00
2013-06-21 08:35:46 +00:00
# Handbook
2013-04-19 03:17:15 +00:00
- [Purposes](Why.md)
2013-04-19 02:31:20 +00:00
- [Installation](Install.md)
- [Quick start](Quickstart.md)
- [Step by step](Tutorial.md)
- [Real world usage](Application.md)
2013-06-18 10:02:51 +00:00
- [Hot update](HotUpdate.md)
2013-04-11 16:01:25 +00:00
2013-06-21 08:35:46 +00:00
# Documentation
[Go Walker](http://gowalker.org/github.com/astaxie/beego)