-
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.
- Loading branch information
1 parent
dc2ef1d
commit 6b2d446
Showing
8 changed files
with
70 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
build | ||
.vscode | ||
.vscode | ||
*.pyc |
This file was deleted.
Oops, something went wrong.
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 +1,6 @@ | ||
server here | ||
server here | ||
|
||
``` | ||
pip install flask | ||
flask run | ||
``` |
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,33 @@ | ||
from flask import Flask | ||
import os | ||
|
||
|
||
def create_app(test_config=None): | ||
# create and configure the app | ||
app = Flask(__name__, instance_relative_config=True) | ||
|
||
try: | ||
os.makedirs(app.instance_path) | ||
except OSError: | ||
pass | ||
|
||
from app.tracker import trackerRuntime | ||
app.register_blueprint(trackerRuntime.bp) | ||
|
||
from app.unity import unityRuntime | ||
app.register_blueprint(unityRuntime.bp) | ||
|
||
|
||
#curl -v http://127.0.0.1:5000/init-test | ||
@app.route('/init-test') | ||
def initTest(): | ||
return 'App is created and this route is registered!' | ||
|
||
@app.route('/json-test') | ||
def jsonTest(): | ||
return { | ||
"obj1":1, | ||
"obj2":2 | ||
} | ||
|
||
return app |
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,10 @@ | ||
import os, sys | ||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | ||
|
||
from flask import Blueprint, current_app, session | ||
from flask import redirect, url_for, request | ||
from flask import jsonify, send_file | ||
import random | ||
|
||
|
||
bp = Blueprint("tracker-runtime", __name__, url_prefix="/tracker-runtime") |
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,18 @@ | ||
import os, sys | ||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | ||
|
||
from flask import Blueprint, current_app, session | ||
from flask import redirect, url_for, request | ||
from flask import jsonify, send_file | ||
import random | ||
|
||
|
||
bp = Blueprint("unity-runtime", __name__, url_prefix="/unity-runtime") | ||
|
||
@bp.route("/headset-data", methods=["GET"]) | ||
def unity_get_test(): | ||
|
||
return { | ||
"obj1":1, | ||
"obj2":2 | ||
} |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
flask == 2.0.1 |