Last active
October 9, 2017 14:48
-
-
Save is/ac337467dfe7df31fb3cba11cff02ea1 to your computer and use it in GitHub Desktop.
P25 - sonic python sample.
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
# pylint: disable=W0311,W0613,C0111,C0103 | |
from sanic import Sanic, response | |
#from sanic.response import json | |
app = Sanic('S0', log_config=None) | |
@app.route('/') | |
async def index(request): | |
data = {'message': 'hello world'} | |
return response.json(data) | |
if __name__ == '__main__': | |
app.run(host='0.0.0.0', port=8000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment