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
2d4ac847
Commit
2d4ac847
authored
Jan 19, 2023
by
chenhan wang
Browse files
本地调试3.1
parent
9191002b
Changes
2
Hide whitespace changes
Inline
Side-by-side
backend/app/init.go
View file @
2d4ac847
...
@@ -21,7 +21,7 @@ func InitWebFramework() {
...
@@ -21,7 +21,7 @@ func InitWebFramework() {
}
}
func
StartServer
()
{
func
StartServer
()
{
e
.
Logger
.
Fatal
(
e
.
Start
(
controller
.
GetSetting
(
"
test
url"
)))
// 启动服务,注意默认端口80不能省略
e
.
Logger
.
Fatal
(
e
.
Start
(
controller
.
GetSetting
(
"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/routes.go
View file @
2d4ac847
...
@@ -15,7 +15,8 @@ func addRoutes() {
...
@@ -15,7 +15,8 @@ func addRoutes() {
api
.
GET
(
"/ask/sid"
,
controller
.
AskUid
)
api
.
GET
(
"/ask/sid"
,
controller
.
AskUid
)
/* 前端用于上传文件的接口,
/* 前端用于上传文件的接口,
* 使用时需要带上文件后缀名,如fileType:.md, 不设置仍能运行,只是会影响文件在服务端存放位置
* 传输文件内容,content:"xxx", 以文本形式传输
* 使用时带上文件类型,如fileType:"application/x-tex",不设置则下载时无法告知前端文件类型,默认为"text/plain"
* 使用时最好带cookie,没有就用申请api申请。
* 使用时最好带cookie,没有就用申请api申请。
* 其余参数可以不设置,有效期默认半小时后, 最大可访问次数默认30(config文件)
* 其余参数可以不设置,有效期默认半小时后, 最大可访问次数默认30(config文件)
*/
*/
...
...
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