diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..27009d8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/venv +__pycache__ diff --git a/debug.sh b/debug.sh new file mode 100755 index 0000000..305f146 --- /dev/null +++ b/debug.sh @@ -0,0 +1,4 @@ +!#/bin/sh +source venv/bin/activate +flask --app src/app --debug run + diff --git a/src/api/document.py b/src/api/document.py new file mode 100644 index 0000000..0d1dc25 --- /dev/null +++ b/src/api/document.py @@ -0,0 +1,8 @@ +from flask import Blueprint, request + +bp = Blueprint('document', __name__, url_prefix='/api/doc') + +@bp.route('/build') +def build(): + return '

Building '+request.args.get('doc')+'@'+request.args.get('branch')+' ...

' + diff --git a/src/app.py b/src/app.py new file mode 100644 index 0000000..85069a7 --- /dev/null +++ b/src/app.py @@ -0,0 +1,10 @@ +from flask import Flask + +def create_app(): + app = Flask(__name__) + + from api import document + app.register_blueprint(document.bp) + + return app +