diff --git a/server.spl b/server.spl index cceeed3..42f32ec 100644 --- a/server.spl +++ b/server.spl @@ -92,7 +92,7 @@ func props-to-json { | with props ; "\": " concat value properties props-to-json concat }> - :join<", "> concat + :join<", "> concat "}" concat } @@ -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