-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
29 lines (20 loc) · 969 Bytes
/
app.py
File metadata and controls
29 lines (20 loc) · 969 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 sqlite3
from quart import Quart
from quart_db import QuartDB
from quart_schema import QuartSchema
from service.comment_service import comment_service_blueprint
from service.dislike_service import dislike_service_blueprint
from service.like_service import like_service_blueprint
from service.post_service import post_service_blueprint
from service.user_service import user_service_blueprint
from table_creation import creation
app = Quart(__name__)
connection = sqlite3.connect("database.db")
QuartDB(app, url="sqlite:///database.db")
QuartSchema(app)
creation()
app.register_blueprint(user_service_blueprint, url_prefix="/social_network")
app.register_blueprint(post_service_blueprint, url_prefix="/social_network")
app.register_blueprint(comment_service_blueprint, url_prefix="/social_network")
app.register_blueprint(like_service_blueprint, url_prefix="/social_network")
app.register_blueprint(dislike_service_blueprint, url_prefix="/social_network")