from flask import Blueprint, Flask, send_from_directory
from werkzeug.security import check_password_hash, generate_password_hash

from app import db
from app.mod_auth.forms import LoginForm
from app.mod_auth.models import User

mod_ecomm = Blueprint('products', __name__, url_prefix='/products',
                      static_folder='../../frontend/build')


@mod_ecomm.route("/", defaults={'path': ''})
def serve(path):
    if path:
        return send_from_directory(mod_ecomm.static_folder, path)
    else:
        return send_from_directory(mod_ecomm.static_folder, 'index.html')

[((248, 346), 'flask.Blueprint', 'Blueprint', (['"""products"""', '__name__'], {'url_prefix': '"""/products"""', 'static_folder': '"""../../frontend/build"""'}), "('products', __name__, url_prefix='/products', static_folder=\n    '../../frontend/build')\n", (257, 346), False, 'from flask import Blueprint, Flask, send_from_directory\n'), ((463, 513), 'flask.send_from_directory', 'send_from_directory', (['mod_ecomm.static_folder', 'path'], {}), '(mod_ecomm.static_folder, path)\n', (482, 513), False, 'from flask import Blueprint, Flask, send_from_directory\n'), ((541, 599), 'flask.send_from_directory', 'send_from_directory', (['mod_ecomm.static_folder', '"""index.html"""'], {}), "(mod_ecomm.static_folder, 'index.html')\n", (560, 599), False, 'from flask import Blueprint, Flask, send_from_directory\n')]