blob: 6d4e53d2b8314698ad20609c400fd4bb11ed6677 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# boilerplate boilerplate boilerplate
# yay
from flask import Flask
from .db import get_db
def create_app():
app = Flask(__name__)
from . import db
db.init_app(app)
@app.route("/")
def main():
return "the"
@app.route("/b")
def b():
db=get_db()
return str(db.execute("select 2 + 2;").fetchone()[0])
return app
|