Created
September 23, 2016 14:45
-
-
Save agalera/61db7b40d11ab73eb665308ba75e2479 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
import falcon | |
api = falcon.API() | |
def get(url): | |
def wrap_function(func): | |
print(url) | |
api.add_route(url, type('Dummie', (object, ), {'on_get': func})) | |
return func | |
return wrap_function | |
@get('/') | |
def prueba(req, resp): | |
resp.body = "pepe" | |
# gunicorn file:api -b 0.0.0.0:1234 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment