]> gitweb.factorcode.org Git - factor.git/commitdiff
webapps: use wait-for-server to allow MAIN: to work.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 24 Dec 2021 21:52:18 +0000 (13:52 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 24 Dec 2021 21:52:18 +0000 (13:52 -0800)
extra/webapps/benchmark/benchmark.factor
extra/webapps/counter/counter.factor
extra/webapps/help/help.factor
extra/webapps/ip/ip.factor

index 43bb9320089e4a41f22b0d2194e35d2bba5f1188..c292fd34bf31b1fc7d9cc23417973ec9380681bc 100644 (file)
@@ -3,7 +3,7 @@
 
 USING: accessors furnace.actions http.server
 http.server.dispatchers http.server.responses http.server.static
-kernel namespaces ;
+io.servers kernel namespaces ;
 
 IN: webapps.benchmark
 
@@ -21,7 +21,7 @@ TUPLE: benchmark-dispatcher < dispatcher ;
 : run-benchmark-webapp ( -- )
     <benchmark-dispatcher>
         main-responder set-global
-    8080 httpd drop ;
+    8080 httpd wait-for-server ;
 
 ! Use this with apachebench:
 !
index a2a3d73ff6c29128e8d85733a29bec55f0c1cb5e..9d1af2f391e20b7cb63d66c012e557564126382d 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: math kernel accessors http.server http.server.dispatchers
 furnace furnace.actions furnace.sessions furnace.redirection
-html.components html.forms fry urls ;
+html.components html.forms io.servers urls ;
 IN: webapps.counter
 
 SYMBOL: count
@@ -38,6 +38,6 @@ USING: db.sqlite furnace.alloy namespaces ;
     <counter-app>
         counter-db <alloy>
         main-responder set-global
-    8080 httpd drop ;
+    8080 httpd wait-for-server ;
 
 MAIN: run-counter
index 8101daa50fc98d899ca363cde74502a909887249..cbd1d189729208c7172cb2d3184f99ebc2baeca1 100644 (file)
@@ -3,7 +3,7 @@
 USING: accessors assocs furnace.actions furnace.redirection
 help.html help.topics html.components html.forms http.server
 http.server.dispatchers http.server.static io.directories
-io.files.temp kernel locals namespaces sequences
+io.files.temp io.servers kernel locals namespaces sequences
 unicode urls ;
 IN: webapps.help
 
@@ -44,6 +44,6 @@ TUPLE: help-webapp < dispatcher ;
 : run-help-webapp ( -- )
     "docs" cache-file <help-webapp>
         main-responder set-global
-    8080 httpd drop ;
+    8080 httpd wait-for-server ;
 
 MAIN: run-help-webapp
index d2bd1ecea70fff466f6e1575cb05a6bc7d856fd6..d421b16aebaab903f978092ad7611134c602fadb 100644 (file)
@@ -1,7 +1,7 @@
 ! 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
+http.server.dispatchers html.forms io.servers io.sockets
 namespaces prettyprint kernel ;
 IN: webapps.ip
 
@@ -18,6 +18,6 @@ TUPLE: ip-app < dispatcher ;
 
 : run-ip-app ( -- )
     <ip-app> main-responder set-global
-    8080 httpd drop ;
+    8080 httpd wait-for-server ;
 
 MAIN: run-ip-app