Skip to content

Instantly share code, notes, and snippets.

@allanzi
Created April 1, 2020 23:26
Show Gist options
  • Save allanzi/fcd1921f38df99aaa138c4c2ca3dc282 to your computer and use it in GitHub Desktop.
Save allanzi/fcd1921f38df99aaa138c4c2ca3dc282 to your computer and use it in GitHub Desktop.
# 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