This commit is contained in:
parent
2308db4aba
commit
3e530abb65
1 changed files with 7 additions and 5 deletions
10
server.spl
10
server.spl
|
@ -105,7 +105,9 @@ func main { exitcode | with args ;
|
|||
|
||||
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-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">
|
||||
|
@ -115,7 +117,7 @@ func dir { | with client dir location ;
|
|||
}
|
||||
|
||||
"/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
|
||||
clients:foreach<{ | with client ;
|
||||
catch IO {
|
||||
|
@ -142,8 +144,8 @@ func handle-client { | with client ;
|
|||
|
||||
"index.html" "/" client:serve-html-cached;
|
||||
|
||||
client "rewrite" "/1.12.2" dir
|
||||
client "ednieva" "/ednieva" dir
|
||||
client "rewrite" "1.12.2" dir
|
||||
client "ednieva" "ednieva" dir
|
||||
|
||||
"/listen" client:path eq if {
|
||||
client
|
||||
|
|
Loading…
Add table
Reference in a new issue