racket/collects/little-helper/web-root/htdocs/Defaults/documentation/examples/count.ss
Jens Axel Soegaard ac47e02961 Initial checkin of Little Helper.
Little Helper contains a full text search engine. 
Currently it indexes all html-files in /collects/doc.
A mockup web-interface is present in order to facilitate easy experimentation with searches.
Run run-indexer to generate the index for your documentation dir. 
Run launch to start a web-server with the search interface.
Note: Currently assumes w3m is in your path (used to precompute the 
           preview-snippets shown in the search results.

svn: r8836
2008-03-01 13:26:18 +00:00

14 lines
456 B
Scheme

(require (lib "unitsig.ss")
(lib "servlet-sig.ss" "web-server")
(lib "date.ss"))
(let ([count 0]
[date (date->string (seconds->date (current-seconds)) 'time-too)])
(unit/sig () (import servlet^)
(set! count (add1 count))
`(html (head (title "Counter"))
(body ([bgcolor "white"])
(p "This servlet was called " ,(number->string count)
" times since loaded on " ,date ".")))))