A Promise based connection to a mysql database
An example of how to connect to a MySQL database using Javascript Promises. If you want to run this on your own machine be sure to have MySQL installed and enter in the correct credentials for your database. Some comments have been added to help you understand how to use the promise.