My node app with valid syntax is failing silently, but not breaking. Infrastructure problem?
From a once over:


Your console.log statement should be wrapped in a condition so that you can turn off all logging to the console. Node can really slow down because of logging to the console.
If you are going to log to the console, then it would make more sense to log your query and salesData as well. 
Opening and closing a connection every time you want to post a sale is (very) bad practice, check out mysql.createPool
Calling connection.end(); will kill a connection gracefully. calling connection.destroy(), not so much..


All in all, I would always be sensitive to performance and established best practice.