This commit is contained in:
pengtao 2020-09-29 10:21:25 +08:00
parent 7cd75f4daa
commit 5993430397
6 changed files with 51 additions and 4 deletions

6
.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -1,3 +1,20 @@
appname = go_ops
httpport = 8080
runmode = dev
RecoverPanic=true
RouterCaseSensitive = true
MaxMemory = 1 << 26
WebConfig.AutoRender = true
WebConfig.DirectoryIndex = false
WebConfig.EnableXSRF = false
[dev]
EnableErrorsShow = true
httpport = 8080
[prod]
EnableErrorsShow = false
httpport = 8088
[test]
httpport = 8888
EnableErrorsShow = true

View File

@ -9,7 +9,7 @@ type MainController struct {
}
func (c *MainController) Get() {
c.Data["Website"] = "beego.me"
c.Data["Email"] = "astaxie@gmail.com"
c.Data["Website"] = "kingsome.me"
c.Data["Email"] = "pengtao@kingsome.com"
c.TplName = "index.tpl"
}

2
download1/1.txt Normal file
View File

@ -0,0 +1,2 @@
1 a
2 b

View File

@ -6,5 +6,6 @@ import (
)
func main() {
beego.SetStaticPath("/down1", "download1")
beego.Run()
}

View File

@ -1 +1,22 @@
function b(a){var c=new WebSocket(a);c.onclose=function(){setTimeout(function(){b(a)},2E3)};c.onmessage=function(){location.reload()}}try{if(window.WebSocket)try{b("ws://localhost:12450/reload")}catch(a){console.error(a)}else console.log("Your browser does not support WebSockets.")}catch(a){console.error("Exception during connecting to Reload:",a)};
function b(a) {
var c = new WebSocket(a);
c.onclose = function () {
setTimeout(function () {
b(a)
}, 2E3)
};
c.onmessage = function () {
location.reload()
}
}
try {
if (window.WebSocket) try {
b("ws://localhost:12450/reload")
} catch (a) {
console.error(a)
} else console.log("Your browser does not support WebSockets.")
} catch (a) {
console.error("Exception during connecting to Reload:", a)
}
;