Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
7526b9df
Commit
7526b9df
authored
Dec 15, 2012
by
xiemengjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加入门文档和删除打开默认文档出错日志
parent
902acbb8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
1 deletion
+34
-1
README.md
README.md
+33
-0
beego.go
beego.go
+1
-1
No files found.
README.md
View file @
7526b9df
...
...
@@ -14,3 +14,36 @@ To install:
go install github.com/astaxie/beego
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
beego.go
View file @
7526b9df
...
...
@@ -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"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment