Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
7526b9df
authored
2012-12-16 00:06:18 +0800
by
xiemengjun
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加入门文档和删除打开默认文档出错日志
1 parent
902acbb8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
1 deletions
README.md
beego.go
README.md
View file @
7526b9d
...
...
@@ -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 @
7526b9d
...
...
@@ -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
Styling with
Markdown
is supported
Attach a file
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 post a comment