$ # trivial server which echo's to the console.
$ cat > srv.janet << EOF
#!/usr/bin/env janet
(defn handle-conn [conn]
(print "new connection")
(while true
(def data (net/read conn 4096))
(if (not data) (break))
(prin data))
(net/close conn)
(print "connection closed"))
(print "starting server on 0.0.0.0:1234")
(net/server "0.0.0.0" 1234 handle-conn)
EOF
$ chmod +x srv.janet
$ ./srv.janet
----
$ # in another terminal:
$ echo hello | nc 0.0.0.0 1234