Paste: persistence

Author: xiackok
Mode: factor
Date: Fri, 21 Jan 2011 01:13:40
Plain Text |
Generic word
query>statement
does not define a method for the
POSTPONE: f
class.
Dispatching on object:
f


(U)	Quotation:
[ set-namestack init-catchstack self quot>> call -> stop ]
(O)	Word:
handle-client
(O)	Method:
M\ http-server handle-client*
(O)	Word:
do-request
(O)	Method:
M\ boilerplate call-responder*
(U)	Quotation:
[ init-sidebars -> init-relative-link-prefix ]
(O)	Word:
init-sidebars
(O)	Word:
latest-revision
(O)	Word:
select-tuple
(O)	Method:
M\ object query>statement
(O)	Word:
no-method
(O)	Method:
M\ object throw
(U)	Quotation:
[
63 special-object error-thread set-global
continuation -> error-continuation set-global
[ original-error set-global ] [ rethrow ] bi
]

Annotation: howto launch webapps.wiki (sort of)

Author: otoburb
Mode: factor
Date: Fri, 21 Jan 2011 01:28:02
Plain Text |
USING: db.sqlite db.tuples db.types ;

wiki-db [ article revision [ ensure-table ] bi@ ] with-db
wiki-db [ init-wiki ] with-db
<wiki> wiki-db <alloy>
main-responder set-global 8080 httpd

! At this point, you have a threaded-server on the stack you can stop with "stop-server"
! This will give you a semi-working webapps.wiki because it throws a 500 error when I tried to edit articles, but this gives the general gist of using with-db and undersatnding <alloy> for database persistence in Furnace.

New Annotation

Summary:
Author:
Mode:
Body: