This commit is contained in:
parent
2308db4aba
commit
3e530abb65
1 changed files with 7 additions and 5 deletions
12
server.spl
12
server.spl
|
@ -92,7 +92,7 @@ func props-to-json { | with props ;
|
||||||
"\": " concat
|
"\": " concat
|
||||||
value properties props-to-json concat
|
value properties props-to-json concat
|
||||||
}>
|
}>
|
||||||
:join<", "> concat
|
:join<", "> concat
|
||||||
"}" concat
|
"}" concat
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,9 @@ func main { exitcode | with args ;
|
||||||
|
|
||||||
def clients LinkedList:new =clients
|
def clients LinkedList:new =clients
|
||||||
|
|
||||||
func dir { | with client dir location ;
|
func dir { | with client dir id ;
|
||||||
|
def location "/" id concat =location
|
||||||
|
|
||||||
dir "/BaseBand-release.jar" concat location "/download/client/release" concat client:serve-file-cached;<"application/octet-stream">
|
dir "/BaseBand-release.jar" concat location "/download/client/release" concat client:serve-file-cached;<"application/octet-stream">
|
||||||
dir "/BaseBand-main.jar" concat location "/download/client/main" concat client:serve-file-cached;<"application/octet-stream">
|
dir "/BaseBand-main.jar" concat location "/download/client/main" concat client:serve-file-cached;<"application/octet-stream">
|
||||||
dir "/BaseBand-Loader.jar" concat location "/download/loader" concat client:serve-file-cached;<"application/octet-stream">
|
dir "/BaseBand-Loader.jar" concat location "/download/loader" concat client:serve-file-cached;<"application/octet-stream">
|
||||||
|
@ -115,7 +117,7 @@ func dir { | with client dir location ;
|
||||||
}
|
}
|
||||||
|
|
||||||
"/refresh" client:path eq if {
|
"/refresh" client:path eq if {
|
||||||
def event "refresh:" location concat dir Branches:new Event:new:json =event
|
def event "refresh:" id concat dir Branches:new Event:new:json =event
|
||||||
def new-clients LinkedList:new =new-clients
|
def new-clients LinkedList:new =new-clients
|
||||||
clients:foreach<{ | with client ;
|
clients:foreach<{ | with client ;
|
||||||
catch IO {
|
catch IO {
|
||||||
|
@ -142,8 +144,8 @@ func handle-client { | with client ;
|
||||||
|
|
||||||
"index.html" "/" client:serve-html-cached;
|
"index.html" "/" client:serve-html-cached;
|
||||||
|
|
||||||
client "rewrite" "/1.12.2" dir
|
client "rewrite" "1.12.2" dir
|
||||||
client "ednieva" "/ednieva" dir
|
client "ednieva" "ednieva" dir
|
||||||
|
|
||||||
"/listen" client:path eq if {
|
"/listen" client:path eq if {
|
||||||
client
|
client
|
||||||
|
|
Loading…
Add table
Reference in a new issue