! See http://factorcode.org/license.txt for BSD license.
USING: furnace furnace.actions furnace.redirection
http.server.dispatchers html.forms validators urls accessors
-math kernel ;
+math kernel io.directories ;
IN: webapps.calculator
TUPLE: calculator < dispatcher ;
: calculator-db ( -- db ) "calculator.db" <sqlite-db> ;
: run-calculator ( -- )
- <calculator>
- calculator-db <alloy>
- main-responder set-global
- 8080 httpd drop ;
+ [
+ <calculator>
+ calculator-db <alloy>
+ main-responder set-global
+ 8080 httpd drop
+ ] with-resource-directory ;
MAIN: run-calculator