Spaces:
Running
Running
# portfolio/app.py | |
from flask import Flask, render_template | |
from npc_social_network.routes.npc_route import npc_bp | |
# from stock.routes.stock_route import stock_bp | |
import os | |
def create_app(): | |
app = Flask(__name__) # static/template 경로를 기본값 | |
# 각 프로젝트는 Blueprint에서 자기 static/template 관리 | |
app.register_blueprint(npc_bp) | |
# app.register_blueprint(stock_bp) | |
def index(): | |
return render_template("main.html") | |
return app | |
app = create_app() | |
if __name__ == '__main__': | |
app.run(debug=True) |