Another html.streasm usage
parent
3a6532a9f8
commit
23c0d0fc93
|
@ -1,10 +1,10 @@
|
||||||
! Copyright (C) 2003, 2008 Slava Pestov.
|
! Copyright (C) 2003, 2008 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: assocs kernel namespaces io io.timeouts strings splitting
|
USING: assocs kernel namespaces io io.timeouts strings splitting
|
||||||
threads sequences prettyprint io.server logging calendar
|
threads sequences prettyprint io.server logging calendar http
|
||||||
http html html.elements accessors math.parser combinators.lib
|
html.streams html.elements accessors math.parser combinators.lib
|
||||||
tools.vocabs debugger continuations random combinators
|
tools.vocabs debugger continuations random combinators
|
||||||
destructors io.encodings.8-bit fry classes words ;
|
destructors io.encodings.8-bit fry classes words math ;
|
||||||
IN: http.server
|
IN: http.server
|
||||||
|
|
||||||
! path is a sequence of path component strings
|
! path is a sequence of path component strings
|
||||||
|
@ -274,9 +274,11 @@ SYMBOL: exit-continuation
|
||||||
] with-destructors ;
|
] with-destructors ;
|
||||||
|
|
||||||
: httpd ( port -- )
|
: httpd ( port -- )
|
||||||
internet-server "http.server"
|
dup integer? [ internet-server ] when
|
||||||
latin1 [ handle-client ] with-server ;
|
"http.server" latin1
|
||||||
|
[ handle-client ] with-server ;
|
||||||
|
|
||||||
: httpd-main ( -- ) 8888 httpd ;
|
: httpd-main ( -- )
|
||||||
|
8888 httpd ;
|
||||||
|
|
||||||
MAIN: httpd-main
|
MAIN: httpd-main
|
||||||
|
|
Loading…
Reference in New Issue