File size: 577 Bytes
9625f38
 
 
a3830f2
 
7cfe55a
 
a3830f2
7cfe55a
a3830f2
6c5b86d
 
7cfe55a
 
 
9625f38
7cfe55a
9625f38
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 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)

    @app.route("/")
    def index():
        return render_template("main.html")
    

    return app

app = create_app()

if __name__ == '__main__':
    app.run(debug=True)