blob: d0e4d30a2f94de9c7238640f1496f8d6ae4e5da0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import logging
from flask import Flask
from flask_restful import Api
from api.urls import urlpatterns
logger = logging.getLogger(__name__)
app = Flask(__name__)
api = Api(app)
reduce(lambda a, b: a.add_resource(b.resource, b.url,
endpoint=b.endpoint) or a, urlpatterns, api)
if __name__ == '__main__':
logger.info('Starting server')
app.run(host='0.0.0.0')
|