Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenhan wang
pastebin
Commits
6ebe6ace
Commit
6ebe6ace
authored
Jan 19, 2023
by
chenhan wang
Browse files
本地调试3.2
parent
2d4ac847
Changes
3
Show whitespace changes
Inline
Side-by-side
backend/app/controller/foo.go
View file @
6ebe6ace
...
@@ -71,7 +71,7 @@ func GetFileContentType(fileType string) string {
...
@@ -71,7 +71,7 @@ func GetFileContentType(fileType string) string {
case
".md"
:
case
".md"
:
StrRet
=
"text/x-markdown"
StrRet
=
"text/x-markdown"
default
:
default
:
StrRet
=
fileType
StrRet
=
"text/plain"
}
}
return
StrRet
return
StrRet
}
}
...
...
backend/app/init.go
View file @
6ebe6ace
...
@@ -21,7 +21,7 @@ func InitWebFramework() {
...
@@ -21,7 +21,7 @@ func InitWebFramework() {
}
}
func
StartServer
()
{
func
StartServer
()
{
e
.
Logger
.
Fatal
(
e
.
Start
(
controller
.
GetSetting
(
"url"
)))
// 启动服务,注意默认端口80不能省略
e
.
Logger
.
Fatal
(
e
.
Start
(
controller
.
GetSetting
(
"
test
url"
)))
// 启动服务,注意默认端口80不能省略
//e.Logger.Fatal(e.Start("127.0.0.1:80")) // 启动服务,注意默认端口80不能省略
//e.Logger.Fatal(e.Start("127.0.0.1:80")) // 启动服务,注意默认端口80不能省略
//e.Logger.Fatal(e.Start("http://xlab.zju.edu.cn/test/pastebin/group-1:80")) // 启动服务,注意默认端口80不能省略,需要域名解析,config
//e.Logger.Fatal(e.Start("http://xlab.zju.edu.cn/test/pastebin/group-1:80")) // 启动服务,注意默认端口80不能省略,需要域名解析,config
}
}
...
...
backend/app/response/reponse.go
View file @
6ebe6ace
...
@@ -24,8 +24,8 @@ type Response2 struct {
...
@@ -24,8 +24,8 @@ type Response2 struct {
type
Response3
struct
{
type
Response3
struct
{
Code
int
`json:"code"`
Code
int
`json:"code"`
Msg
string
`json:"msg"`
Msg
string
`json:"msg"`
Name
string
`json:"
fileN
ame"`
Name
string
`json:"
n
ame"`
Type
string
`json:"
fileT
ype"`
Type
string
`json:"
t
ype"`
Data
interface
{}
`json:"data"`
Data
interface
{}
`json:"data"`
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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