Open kariso2000 opened 4 years ago
pip3 install flask flask-sqlalchemy flask-login flask-migrate
Login to Mysql server and create a new database if not already created. Replace database_name below with your db name:
export DATABASE_URL='mysql://username:password@0.0.0.0/database_name' export SECRET_KEY=xxyyzz export FLASK_ENV=development export FLASK_APP=ai4good/webapp/server:flask_app
flask db stamp head flask db migrate -m 'init' flask db upgrade
Check your database to see if you have the user table.
Your .env file should have the following:
DATABASE_URI = 'mysql://usernane:password@0.0.0.0/database_name'
@pardf Try the above to set up mysql
You may need a local mysql client if requirements.txt fails to install:
sudo apt-get install libmysqlclient-dev
export DATABASE_URL=sqlite:///app.db export SECRET_KEY=xxyyzz
export FLASK_ENV=development export FLASK_APP=ai4good/webapp/server:flask_app flask db init flask db migrate -m 'init' flask db upgrade