Add config.py
This commit is contained in:
parent
f596b2287f
commit
11ef9cabfb
|
@ -1,16 +1,9 @@
|
|||
import os
|
||||
|
||||
from dotenv import load_dotenv
|
||||
from flask import Flask, render_template
|
||||
|
||||
from api import api
|
||||
from config import API_HOST, DATABASE_URI
|
||||
from db import get_endpoints_from_db, init_db
|
||||
|
||||
load_dotenv()
|
||||
|
||||
DATABASE_URI = os.getenv("DATABASE")
|
||||
API_HOST = os.getenv("API_HOST")
|
||||
|
||||
app = Flask(__name__)
|
||||
app.config["SQLALCHEMY_DATABASE_URI"] = DATABASE_URI
|
||||
app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
import os
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
|
||||
DATABASE_URI = os.getenv("DATABASE")
|
||||
API_HOST = os.getenv("API_HOST")
|
Loading…
Reference in New Issue