Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lichenggang
/
web_log
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1b1acd6b
authored
Dec 24, 2020
by
lichenggang
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
采用iris框架
parent
5a3713c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
main.go
main.go
0 → 100644
View file @
1b1acd6b
package
main
import
(
"github.com/kataras/iris/v12"
"os"
"web_log/code"
)
// example
func
main
()
{
Directory
:=
"E:
\\
test_logs"
// directory of the log
TestPort
:=
9997
logenv
:=
os
.
Getenv
(
"GOLOGENV"
)
if
logenv
==
"TEST"
{
Directory
=
"/data/soft/bigdatav3.0/test_rsync_log"
}
if
logenv
==
"PRODUCT"
{
Directory
=
"/data/soft/rsync_log"
}
app
:=
code
.
GetApp
(
Directory
,
TestPort
)
app
.
Run
(
iris
.
Addr
(
"0.0.0.0:9997"
),
iris
.
WithCharset
(
"UTF-8"
))
}
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