Using Flask backend with a MySQL database to implement a basic CRUD web application
- Download Python 3.12, and all dependencies
- Download MySQL, remember your root password
- Download this codebase
- Create an instance folder
- Create a config.json file inside said folder
- Inside the config file, the following config are needed to run this server on your localhost
{ "DATABASE": { "host": "localhost", "user": "root", "password": [INSERT YOUR MYSQL ROOT PASSWORD HERE] }, "SECRET_KEY": [PUT IN ANY VALID STRING, JUST KEEP IT SECRET] }
- In the root folder of project, run
flask --app manager init-db
followed byflask --app manager ins-example
followed byflask --app manager run
- Check your localhost; profit