Wednesday 20 December 2017

A little feedback...

Long time ColdFusion dev here, looking to branch out into newer technologies.I am working through a re-write of a legacy CF app I wrote about 8 years ago into Node, and I am just looking for some feedback on how I'm building my modules:- ie am I doing it correctly? Here's an example:http://ift.tt/2oW3Ks8 I be declaring my required modules inside the export?Are callbacks acceptable in smaller code? Or should I focus more on async/await?Should I end the connection inside the connection.query()?Should I even be using two connections as in the code snippet, or should I wrap it all into one and then close?As a side note, this module is working fine without errors, and serves the purpose it was written for. I just want to be sure im moving forward in the right direction while im still early in the project.Thanks for your time.

Submitted December 20, 2017 at 09:55AM by mattj85

No comments:

Post a Comment