-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.py
More file actions
35 lines (27 loc) · 940 Bytes
/
Copy pathserver.py
File metadata and controls
35 lines (27 loc) · 940 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from flask import Flask, jsonify
from flasgger import Swagger
# from flask_restplus import Api, Resource
# from app.blueprints.user.controllers import blueprint_user
# from app.blueprints.converter.converter import blueprint_converter
from app.blueprints.gateway.gateway import blueprint_gateway
import os
app = Flask(__name__)
# app.register_blueprint(blueprint_user)
# app.register_blueprint(blueprint_converter)
app.register_blueprint(blueprint_gateway)
swagger = Swagger(app)
def create_app():
app = Flask(__name__)
# app.register_blueprint(blueprint_user)
# app.register_blueprint(blueprint_converter)
app.register_blueprint(blueprint_gateway)
swagger = Swagger(app)
return app
@app.cli.command()
def test():
"""Run the unit tests."""
import unittest
tests = unittest.TestLoader().discover('tests')
unittest.TextTestRunner(verbosity=2).run(tests)
if __name__ == "__main__":
app.run()