infra/tnoe/tnoegatherer.spl

22 lines
352 B
Text
Raw Permalink Normal View History

2024-11-22 14:06:33 +01:00
"#httpserver/base.spl" import
func main { exitcode | with args ;
def server
net:http:Server:new<"::0" 4000> =server
"Started listening on ::0:4000" println
"ip a:" println
[ "ip" "a" ] command-wait;
while { 1 } {
server:accept
dup :read
dup :path println
dup :body _str println
:write-ok:write-str-body<"">:finish;
}
0
}