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
23229ef9
Commit
23229ef9
authored
May 25, 2014
by
astaxie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
beego: BeegoServerName & beego.Run
BeegoServerName change to beegoServer+Version beego.Run(“:8089”)
parent
0d17d974
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
beego.go
beego.go
+14
-2
config.go
config.go
+1
-1
No files found.
beego.go
View file @
23229ef9
...
@@ -284,8 +284,19 @@ func AddAPPStartHook(hf hookfunc) {
...
@@ -284,8 +284,19 @@ func AddAPPStartHook(hf hookfunc) {
}
}
// Run beego application.
// Run beego application.
// it's alias of App.Run.
// beego.Run() default run on HttpPort
func
Run
()
{
// beego.Run(":8089")
// beego.Run("127.0.0.1:8089")
func
Run
(
params
...
string
)
{
if
len
(
params
)
>
0
&&
params
[
0
]
!=
""
{
strs
:=
strings
.
Split
(
params
[
0
],
":"
)
if
len
(
strs
)
>
0
&&
strs
[
0
]
!=
""
{
HttpAddr
=
strs
[
0
]
}
if
len
(
strs
)
>
1
&&
strs
[
1
]
!=
""
{
HttpPort
,
_
=
strconv
.
Atoi
(
strs
[
1
])
}
}
initBeforeHttpRun
()
initBeforeHttpRun
()
if
EnableAdmin
{
if
EnableAdmin
{
...
@@ -346,6 +357,7 @@ func initBeforeHttpRun() {
...
@@ -346,6 +357,7 @@ func initBeforeHttpRun() {
middleware
.
RegisterErrorHandler
()
middleware
.
RegisterErrorHandler
()
}
}
// this function is for test package init
func
TestBeegoInit
(
apppath
string
)
{
func
TestBeegoInit
(
apppath
string
)
{
AppPath
=
apppath
AppPath
=
apppath
AppConfigPath
=
filepath
.
Join
(
AppPath
,
"conf"
,
"app.conf"
)
AppConfigPath
=
filepath
.
Join
(
AppPath
,
"conf"
,
"app.conf"
)
...
...
config.go
View file @
23229ef9
...
@@ -142,7 +142,7 @@ func init() {
...
@@ -142,7 +142,7 @@ func init() {
TemplateLeft
=
"{{"
TemplateLeft
=
"{{"
TemplateRight
=
"}}"
TemplateRight
=
"}}"
BeegoServerName
=
"beegoServer
"
BeegoServerName
=
"beegoServer
:"
+
VERSION
EnableAdmin
=
false
EnableAdmin
=
false
AdminHttpAddr
=
"127.0.0.1"
AdminHttpAddr
=
"127.0.0.1"
...
...
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