[tbnl-devel] simple example

Edi Weitz edi at agharta.de
Fri Sep 2 09:53:57 UTC 2005


On Thu, 1 Sep 2005 19:03:57 -0400, Adam Thorsen <adam.thorsen at gmail.com> wrote:

> I'm looking for a really simple example of how to use TBNL.  Just a
> sort of "Hello World."  I'm currently feeling a bit overwhelmed by
> the test.lisp example file.
>
> Can anybody point me to one or supply me with one?

  ;;; To test add something like this to your httpd.conf
  ;;;
  ;;;   LispServer 127.0.0.1 3000 "tbnl"
  ;;;
  ;;;   <Location /tbnl>
  ;;;     SetHandler lisp-handler
  ;;;   </Location>
  ;;;
  ;;; and afterwards restart Apache, load this file, and evaluate
  ;;;
  ;;;   (tbnl:start-tbnl)
  ;;;
  ;;; then point your browser at <http://localhost/tbnl/test>.

  (in-package #:tbnl)

  (setq *dispatch-table*
        (list (create-prefix-dispatcher "/tbnl/test" 'foo)
              'default-dispatcher))

  (defun foo ()
    "Hello World!")

HTH,
Edi.



More information about the Tbnl-devel mailing list