Skip to content

Instantly share code, notes, and snippets.

@allanaguilar
Last active July 3, 2018 21:46
Show Gist options
  • Save allanaguilar/8d0fcb2e6b2e04c50ee638558c1ab46a to your computer and use it in GitHub Desktop.
Save allanaguilar/8d0fcb2e6b2e04c50ee638558c1ab46a to your computer and use it in GitHub Desktop.
Sample for micro web server
#!/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