Created
April 1, 2020 23:26
-
-
Save allanzi/fcd1921f38df99aaa138c4c2ca3dc282 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# app.py | |
import os | |
from flask import Flask | |
from flask_restful import Resource, Api | |
app = Flask(__name__) | |
api = Api(app) | |
class HelloWorld(Resource): | |
def get(self): | |
return {'hello': os.getenv('DB_HOST')} | |
api.add_resource(HelloWorld, '/') | |
if __name__ == '__main__': | |
app.run(debug=True, host='0.0.0.0') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment