[hunchentoot-devel] Running multiple web application

Edi Weitz edi at agharta.de
Thu Apr 12 21:59:16 UTC 2007


On Thu, 12 Apr 2007 16:13:20 -0400, "Andrei Stebakov" <lispercat at gmail.com> wrote:

> So I need to keep track of all servers that I start and for each one
> return it's dispatch-table something like this?:
> (defvar *server1* (start-server :port 3001....)
> (defvar *server2* (start-server :port 3002....)
> (setq *meta-dispatcher* (lambda (server)
>                             (declare (ignore server))
>                             (if (eql server *server1*) *dispatch-table1* *dispatch-table2*)))

No, you don't have to do it like this.  There are certainly more
intelligent ways to do it.  I'd use something like

  (lambda (server)
    (case (server-local-port server)
      (3001 *dispatch-table1*)
      (3002 *dispatch-table2*)))

> Why can't start-server take a dispatch-table as a parameter?

Did you read my last reply?

If there's a feature in an open source project you want to have that's
not provided, you can hack it yourself and send a patch, or you can
pay someone else to do it, or you can complain about it on the mailing
list.  You can try to figure out yourself which of these alternatives
is the most promising.



More information about the Tbnl-devel mailing list