fix
This commit is contained in:
parent
7cd75f4daa
commit
5993430397
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal 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>
|
@ -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
|
@ -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
2
download1/1.txt
Normal file
@ -0,0 +1,2 @@
|
||||
1 a
|
||||
2 b
|
1
main.go
1
main.go
@ -6,5 +6,6 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
beego.SetStaticPath("/down1", "download1")
|
||||
beego.Run()
|
||||
}
|
||||
|
23
static/js/reload.min.js
vendored
23
static/js/reload.min.js
vendored
@ -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)
|
||||
}
|
||||
;
|
||||
|
Loading…
x
Reference in New Issue
Block a user