! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. USING: accessors furnace.actions http.server http.server.dispatchers html.forms io.sockets namespaces prettyprint ; IN: webapps.ip TUPLE: ip-app < dispatcher ; : ( -- action ) [ remote-address get host>> "ip" set-value ] >>init { ip-app "ip" } >>template ; : ( -- dispatcher ) ip-app new-dispatcher "" add-responder ; : run-ip-app ( -- ) main-responder set-global 8080 httpd ; MAIN: run-ip-app