diff --git a/extra/webapps/imagebin/imagebin.factor b/extra/webapps/imagebin/imagebin.factor index 38ef0f9459..e9fc2c742f 100644 --- a/extra/webapps/imagebin/imagebin.factor +++ b/extra/webapps/imagebin/imagebin.factor @@ -1,10 +1,9 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors furnace.actions furnace.redirection -html.forms http http.server http.server.dispatchers -io.directories io.encodings.utf8 io.files io.pathnames -kernel math.parser multiline namespaces sequences urls -math ; +USING: accessors furnace.actions furnace.redirection http.server +http.server.dispatchers io.directories io.encodings.utf8 io.files +io.pathnames kernel math math.parser namespaces sequences +webapps.utils ; IN: webapps.imagebin TUPLE: imagebin < dispatcher path n ; @@ -43,4 +42,6 @@ M: imagebin call-responder* "upload-image" add-responder "uploaded-image" add-responder ; -"resource:images" main-responder set-global +: start-imagebin ( -- ) + "resource:images" main-responder set-global + run-test-httpd ; diff --git a/extra/webapps/site-watcher/site-watcher.factor b/extra/webapps/site-watcher/site-watcher.factor index e1c1b62dab..219b990444 100644 --- a/extra/webapps/site-watcher/site-watcher.factor +++ b/extra/webapps/site-watcher/site-watcher.factor @@ -40,7 +40,7 @@ IN: webapps.site-watcher "update notification details" >>description ; -: ( -- dispatcher ) +: ( -- dispatcher ) site-watcher-app new-dispatcher "" add-responder "watch-list" add-responder @@ -63,11 +63,12 @@ IN: webapps.site-watcher : site-watcher-db ( -- db ) "test.db" ; - - - { site-watcher-app "site-watcher" } >>template -site-watcher-db -main-responder set-global +: ( -- dispatcher ) + + + + { site-watcher-app "site-watcher" } >>template + site-watcher-db ; M: site-watcher-app init-user-profile drop "username" value "email" value insert-tuple ; @@ -81,4 +82,5 @@ M: site-watcher-app init-user-profile : start-site-watcher ( -- ) init-db site-watcher-db run-site-watcher + main-responder set-global run-test-httpd ;