Update webapps.counter for alloy change

db4
Slava Pestov 2008-09-23 03:35:01 -05:00
parent b890c83744
commit 47a74f0545
1 changed files with 3 additions and 8 deletions

View File

@ -2,8 +2,7 @@
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: math kernel accessors http.server http.server.dispatchers USING: math kernel accessors http.server http.server.dispatchers
furnace furnace.actions furnace.sessions furnace.redirection furnace furnace.actions furnace.sessions furnace.redirection
html.components html.forms html.templates.chloe html.components html.forms fry urls ;
fry urls ;
IN: webapps.counter IN: webapps.counter
SYMBOL: count SYMBOL: count
@ -32,17 +31,13 @@ M: counter-app init-session* drop 0 count sset ;
<sessions> ; <sessions> ;
! Deployment example ! Deployment example
USING: db.sqlite db.tuples db furnace.db namespaces ; USING: db.sqlite furnace.alloy namespaces ;
: counter-db ( -- params db ) "counter.db" sqlite-db ; : counter-db ( -- params db ) "counter.db" sqlite-db ;
: init-counter-db ( -- )
counter-db [ session ensure-table ] with-db ;
: run-counter ( -- ) : run-counter ( -- )
init-counter-db
<counter-app> <counter-app>
counter-db <db-persistence> counter-db <alloy>
main-responder set-global main-responder set-global
8080 httpd ; 8080 httpd ;