forked from lx881219/enodo-fullstack-challenge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
24 lines (16 loc) · 600 Bytes
/
Copy pathrun.py
File metadata and controls
24 lines (16 loc) · 600 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
import logging
from flask import Flask
from app.util import configure_logging
from app.apis import register_apis_blueprint
from app.views import register_views_blueprint
from app.db import (create_database,
get_database_connection)
logger = logging.getLogger(__name__)
configure_logging()
flask_application = Flask("enodo", static_folder="app/static")
connection = get_database_connection()
with connection:
create_database(connection)
register_views_blueprint(flask_application)
register_apis_blueprint(flask_application)
flask_application.run(port=8080, debug=True)