Handbook
Glossary
zim-main ( -- )
Vocabulary
zim
.
server
Inputs
None
Outputs
None
Definition
USING:
command-line
formatting
http.server
io
io.servers
kernel
math.parser
namespaces
sequences
sequences.extras
;
IN:
zim.server
:
zim-main
( -- )
command-line
get
[
"Usage: zim path [port]"
print
]
[
?first2
[
string>number
]
[
8080
]
if*
2dup
"Serving '%s' on port %d\n"
printf
flush
swap
<zim-responder>
main-responder
set-global
httpd
wait-for-server
]
if-empty
;