Created
June 28, 2018 15:58
-
-
Save greed2411/ab836e5ec29f79de2d9ad297c19c12eb to your computer and use it in GitHub Desktop.
vibora
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
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