# app/__init__.py
import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy

# import mysql.connector


UPLOAD_FOLDER = os.path.join(os.getcwd(), 'app', 'docs')

app = Flask('app', static_url_path='')
app.config.update(
    DEBUG=True,
    # SQLALCHEMY_DATABASE_URI='mysql+mysqlconnector://website:henrypump@127.0.0.1/poconsole'
    SQLALCHEMY_DATABASE_URI='sqlite:///../database.db',
)
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024
app.secret_key = 'henry_pump'
db = SQLAlchemy(app)

from datalogger import views
from datalogger import api
from datalogger.models import *
