Skip to content

Instantly share code, notes, and snippets.

@leafo
Last active August 29, 2015 14:02
Show Gist options
  • Save leafo/96082dd98aaf67282e7d to your computer and use it in GitHub Desktop.
Save leafo/96082dd98aaf67282e7d to your computer and use it in GitHub Desktop.
require 'breeze'
-- declare class
FooHandler = class('FooHandler', ActiveHandler)
-- constructor
function FooHandler:initialize()
-- call base class constructor
ActiveHandler.initialize(self)
self:addRoute('GET /bar', 'barHandler')
end
-- handler for GET /foo/bar
function barHandler()
response.body = {foo='bar'}
end
FooHandler:new()
breeze.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment