Last active
July 3, 2018 21:46
-
-
Save allanaguilar/8d0fcb2e6b2e04c50ee638558c1ab46a to your computer and use it in GitHub Desktop.
Sample for micro web server
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
#INSTALL FLASK WITH: pip install Flask | |
from flask import Flask, request | |
app = Flask(__name__) | |
@app.route('/saludo', methods=['GET']) | |
def hello(): | |
return "Hello %s!" % (request.args.get('name')) | |
if __name__ == '__main__': | |
app.run() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment