Skip to content

Instantly share code, notes, and snippets.

@greed2411
Created June 28, 2018 15:58
Show Gist options
  • Save greed2411/ab836e5ec29f79de2d9ad297c19c12eb to your computer and use it in GitHub Desktop.
Save greed2411/ab836e5ec29f79de2d9ad297c19c12eb to your computer and use it in GitHub Desktop.
vibora
from vibora import Vibora, Response
app = Vibora()
@app.route('/')
async def index():
return Response(b'', headers={'content-type': 'html'})
@app.route("/user/<int:id>", methods=['GET'])
async def user_info(id):
return Response(f'{id}', headers={'content-type': 'html'})
@app.route("/user", methods=['POST'])
async def user():
return Response(b'', headers={'content-type': 'html'})
if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0', port=3000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment