> Here is an example on how to run a WSAPI application

One would also need your URL.lua, but once this is added, the
following code successfully runs Sputnik in HTTP.lua:

    local HTTP = require( 'HTTP' )
    local TCPServer = require( 'TCPServer' )
    local WSAPI = require( 'WSAPI' )
    HTTP[ '.*' ] = WSAPI( loadfile("sputnik.ws")() )
    TCPServer( '127.0.0.1', 1080 )( HTTP )

Yay, the power of standardization!

For some reason, it runs much slower than in Xavante, but I am sure
this can be fixed.

I actually think it might be worthwhile to wrap this up into a rock
(perhaps giving putting the four modules under the same namespace) and
offer it as an option for WSAPI apps.

- yuri

_______________________________________________
Kepler-Project mailing list
[email protected]
http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project
http://www.keplerproject.org/

Reply via email to