add / message
This commit is contained in:
parent
f43e064570
commit
90fa05c10e
1 changed files with 12 additions and 1 deletions
11
server.py
11
server.py
|
@ -10,8 +10,19 @@ from websockets.socket import socketio
|
||||||
import configuration.models_mount
|
import configuration.models_mount
|
||||||
from flask_migrate import Migrate
|
from flask_migrate import Migrate
|
||||||
|
|
||||||
|
from flask import Blueprint, jsonify
|
||||||
|
|
||||||
|
server = Blueprint('server', __name__, url_prefix='/')
|
||||||
|
|
||||||
|
@server.route('/', methods=['GET'])
|
||||||
|
def api_home():
|
||||||
|
response = {"message": "hello world"}
|
||||||
|
return jsonify(response)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app = create_app()
|
app = create_app()
|
||||||
register_api_endpoints(app)
|
register_api_endpoints(app)
|
||||||
|
app.register_blueprint(server)
|
||||||
migrate = Migrate(app, db)
|
migrate = Migrate(app, db)
|
||||||
socketio.run(app, debug=True)
|
socketio.run(app, debug=True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue