Flask app to demonstate connecting and performing basic operations to MySQL database using mysql connecter in python.
Performs database initialisation, Table creation, Insert operation and Select * operation.
- Clone the repo using any of the following commands
git clone https://github.com/abhinand-c/team_flask.git
git clone [email protected]:abhinand-c/team_flask.git
gh repo clone abhinand-c/team_flask
- Create
.env
file based on the dummy template below in your cloned repo - Set values in .env file, as provided by admin or for development set demo values
- Setup & activate virtual python environment (Refer: Conda Environments or Python venv)
- Install requirements
pip install -r requirements.txt
- Initialise Database with
python .\database\initialiser.py
- Run server using
python runserver.py
Copy the code below and save it in your cloned repo as .env
file, also add the change values as needed.
DB_USER=username
DB_PASSWORD=password
DB_HOST=localhost
DB_NAME=databasename