Created
November 16, 2017 14:32
-
-
Save toshimasa-nanaki/b7fba6828705984f38b861db7b80cd11 to your computer and use it in GitHub Desktop.
Hello World API Python
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 flask import Flask | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
name = "This is the route." | |
return name | |
@app.route('/hello') | |
def hello(): | |
name = "Hello world!" | |
return name | |
if __name__ == "__main__": | |
app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment