Last active
August 29, 2015 14:02
-
-
Save leafo/96082dd98aaf67282e7d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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