-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#103 Stablish Blueprint reference and update docker-compose image ref
- Loading branch information
1 parent
74171f1
commit 21b7f95
Showing
6 changed files
with
42 additions
and
25 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
from project import create_app | ||
from flask.cli import FlaskGroup | ||
from project import app | ||
|
||
# Config coverage report | ||
app = create_app() | ||
cli = FlaskGroup(app) | ||
|
||
|
||
if __name__ == '__main__': | ||
cli() | ||
cli() |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
import os | ||
from flask import Flask, jsonify | ||
from project.api.views import pax_blueprint | ||
|
||
|
||
# instantiate the app | ||
app = Flask(__name__) | ||
def create_app(script_info=None): | ||
# Instantiate the app | ||
app = Flask(__name__) | ||
|
||
# set config | ||
app.config.from_object('project.config.DevelopmentConfig') | ||
# new | ||
# Set Configuration | ||
app_settings = os.getenv('APP_SETTINGS') | ||
app.config.from_object(app_settings) | ||
|
||
# register blueprints | ||
app.register_blueprint(pax_blueprint) | ||
|
||
@app.route('/users/ping', methods=['GET']) | ||
def ping_pong(): | ||
return jsonify({ | ||
'status': 'success', | ||
'message': 'pong!' | ||
}) | ||
return app |
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from flask import request, jsonify, Blueprint | ||
|
||
pax_blueprint = Blueprint('pax', __name__) | ||
|
||
|
||
@pax_blueprint.route('/pax/ping', methods=['GET']) | ||
def ping_pong(): | ||
return jsonify({ | ||
'status': 'success', | ||
'message': 'pong!' | ||
}) |