mirror of
https://github.com/sunrin-ana/2025-SSF-dotory-manage.git
synced 2026-03-09 18:10:02 +00:00
initial test
This commit is contained in:
commit
651703c0f8
19 changed files with 198 additions and 0 deletions
20
app.py
Normal file
20
app.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
from flask import Flask
|
||||
from routes import add_namespaces
|
||||
from flask_restx import Api
|
||||
from db import db
|
||||
from flask_migrate import Migrate
|
||||
|
||||
app = Flask(__name__)
|
||||
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///dotori.db'
|
||||
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
||||
|
||||
db.init_app(app)
|
||||
migrate = Migrate(app, db)
|
||||
|
||||
with app.app_context():
|
||||
db.create_all()
|
||||
|
||||
api = Api(app, doc='/docs')
|
||||
add_namespaces(api)
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True)
|
||||
Loading…
Add table
Add a link
Reference in a new issue