$ pip3 install -r requirements.txt
In config.py
file, fill in your real MySQL connection settings
_DB_CONF = {
'host':'<YOUR-MYSQL-HOST>',
'port':3306,
'user':'<YOUR-MYSQL-USERNAME>',
'passwd':'<YOUR-MYSQL-PASSWORD>',
'db':'<YOUR-MYSQL-DATABASE>'
}
$ flask run
Post man collection included for quick test run
http://localhost:5000/
http://localhost:5000/test - test sql query run connects to aws db
http://localhost:5000/runsqlquery - Post method runs query sent on aws db
json post format {"sql":"<query-to-run>"}
- install docker in your local pc and make sure it is running
- Build the docker container using commmand
docker build -t dbproject1:latest .
- Run the container locally
docker run -d -p 5000:5000 dbproject1