Skip to content

Instantly share code, notes, and snippets.

@nrk
Created August 2, 2009 06:32
Show Gist options
  • Select an option

  • Save nrk/159949 to your computer and use it in GitHub Desktop.

Select an option

Save nrk/159949 to your computer and use it in GitHub Desktop.
Short code snippet that shows how to launch Mercury's greetings sample using Xavante.
--[[
Short code snippet that shows how to launch Mercury's greetings sample using Xavante.
Mercury: http://github.com/nrk/mercury/
Xavante: http://www.keplerproject.org/xavante/
]]
require 'luarocks.require'
require 'xavante'
require 'wsapi.xavante'
package.path = package.path .. ';/var/www/?.lua'
xavante.HTTP{
server = {host = "127.0.0.1", port = 7654},
defaultHost = {
rules = {
{
match = { "^/(.-)$" },
with = wsapi.xavante.makeHandler('greetings')
}
}
}
}
xavante.start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment