Using Flask with SQLAlchemy and Dash

I want to create a login pageto my dash app … using flask
This is the code ;:

 server = Flask(__name__)
 app = dash.Dash(__name__, suppress_callback_exceptions=True, external_stylesheets=[dbc.themes.LITERA 
         , FONT_AWESOME],meta_tags=[{'name': 'viewport', 'content': 'width=device-width, initial-scale=1.0'}]
  app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///test.db'
 db = SQLAlchemy(server)
 I got this error :     raise AttributeError(final_msg, key)
 AttributeError: ('Invalid config key. Some settings are only available via the Dash constructor', 'SQLALCHEMY_DATABASE_URI')

do you have any idea ?

Thaaaaaaaank you !

app = Dash()
server = app.server


server = Flask()
app = Dash(server=server)

@stu thank you so much
I use this ::
its the only thing work for me

server.config['SECRET_KEY'] = 'mysecretkey'
basedir = os.path.abspath(os.path.dirname(__file__))
server.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + os.path.join(basedir, 'test.db')

db = SQLAlchemy(server)