Last active
July 10, 2018 18:02
-
-
Save jattoabdul/abc3cadc88e54fb23309daeabb15018e to your computer and use it in GitHub Desktop.
Application entry point and main route
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_api import FlaskAPI | |
from config.env import app_env | |
from app.utils.slackhelper import SlackHelper | |
# from flask import request, jsonify | |
# from re import match | |
# from app.actions import Actions | |
def create_app(config_name): | |
app = FlaskAPI(__name__, instance_relative_config=False) | |
app.config.from_object(app_env[config_name]) | |
app.config.from_pyfile('../config/env.py') | |
@app.route("/", methods=["GET"]) | |
def home(): | |
"""This route renders a hello world text.""" | |
# rendering text | |
return 'Hello World' | |
return app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment