factor/basis/xmode/code2html/responder/responder.factor

17 lines
550 B
Factor
Raw Normal View History

2008-02-29 01:57:38 -05:00
! Copyright (C) 2007, 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: io io.files io.pathnames io.encodings.utf8 namespaces
http.server http.server.responses http.server.static http
xmode.code2html kernel sequences accessors fry ;
2008-02-29 01:57:38 -05:00
IN: xmode.code2html.responder
: <sources> ( root -- responder )
[
drop
2008-05-28 19:17:58 -04:00
dup '[
2008-09-10 23:11:40 -04:00
_ utf8 [
_ file-name input-stream get htmlize-stream
2008-05-26 01:47:27 -04:00
] with-file-reader
] "text/html" <content>
2008-02-29 01:57:38 -05:00
] <file-responder> ;