Antoni09 commited on
Commit
db00c26
·
verified ·
1 Parent(s): af94e5f

Update server.py

Browse files
Files changed (1) hide show
  1. server.py +1 -4
server.py CHANGED
@@ -5,7 +5,6 @@ from flask import Flask, render_template, request, redirect, url_for
5
  from sqlalchemy import create_engine, text
6
 
7
  from flask import render_template
8
- return render_template("index.html", notes=rows)
9
 
10
  app = Flask(__name__)
11
  engine = create_engine(os.environ["DATABASE_URL"], pool_pre_ping=True)
@@ -42,8 +41,6 @@ ALLOWED_STATIC = {
42
  "Roboto-VariableFont_wdth,wght.ttf",
43
  }
44
 
45
-
46
- app = Flask(__name__, static_folder=str(APP_ROOT), static_url_path="")
47
  @app.get("/")
48
  def health():
49
  return {"ok": True}
@@ -394,7 +391,7 @@ def api_invoices() -> Any:
394
 
395
 
396
  if __name__ == "__main__":
397
- port = int(os.environ.get("PORT", "5000"))
398
  app.run(host="0.0.0.0", port=port, debug=True)
399
 
400
  DATA_DIR = Path(os.environ.get("DATA_DIR", APP_ROOT))
 
5
  from sqlalchemy import create_engine, text
6
 
7
  from flask import render_template
 
8
 
9
  app = Flask(__name__)
10
  engine = create_engine(os.environ["DATABASE_URL"], pool_pre_ping=True)
 
41
  "Roboto-VariableFont_wdth,wght.ttf",
42
  }
43
 
 
 
44
  @app.get("/")
45
  def health():
46
  return {"ok": True}
 
391
 
392
 
393
  if __name__ == "__main__":
394
+ port = int(os.environ.get("PORT", "7860"))
395
  app.run(host="0.0.0.0", port=port, debug=True)
396
 
397
  DATA_DIR = Path(os.environ.get("DATA_DIR", APP_ROOT))