Update webapps.counter for alloy change
parent
b890c83744
commit
47a74f0545
|
@ -2,8 +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 html.templates.chloe
|
||||
fry urls ;
|
||||
html.components html.forms fry urls ;
|
||||
IN: webapps.counter
|
||||
|
||||
SYMBOL: count
|
||||
|
@ -32,17 +31,13 @@ M: counter-app init-session* drop 0 count sset ;
|
|||
<sessions> ;
|
||||
|
||||
! 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 ;
|
||||
|
||||
: init-counter-db ( -- )
|
||||
counter-db [ session ensure-table ] with-db ;
|
||||
|
||||
: run-counter ( -- )
|
||||
init-counter-db
|
||||
<counter-app>
|
||||
counter-db <db-persistence>
|
||||
counter-db <alloy>
|
||||
main-responder set-global
|
||||
8080 httpd ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue