[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Simple Xavante direct handler
- From: Hans Elbers <hans@...>
- Date: Tue, 24 Nov 2009 22:29:08 +0100
Here is a small example that might do what you want...
It is a small server that server lua pages.
You can start it with 'lua Xiliad.lua'
On Tue, 2009-11-24 at 19:13 +0100, Jerome Vuarand wrote:
I'd like to embed Xavante in an existing (non-web) application. I
already managed to get the filehandler and redirecthandler working.
Now, I'd like to add a handler that loads .lua and .lp pages, directly
in the main Xavante interpreter (so that the dynamic pages can access
my application runtime directly). However the cgiluahandler seems to
be insisting on loading the pages in a separater interpreter using
rings. Since I don't want to add rings to my application, and avoid
the complexity of querying my app state through ring communication
channels, I'd like a simpler request handler.
So can anyone help me craft a simple xavante handler, that loads .lua
and .lp pages, so that I can write these LuaPages like standard ones,
but access global variables from my app ?
Any help would be appreciated, since it seems that part of Xavante is
under-documented. I'm asking here because the luaforge list server is
down (it prevents me from asking on the kepler list, and from
searching the archive).
Any help would be appreciated.