nodejs mysql example

When dealing with databases in NodeJS, mongo seems to be the defacto standard. Many people don’t realize that NodeJS can integrate with databases such as mysql easily and effortlessly. Let’s take a look at how we can accomplish this using felixge’s node-mysql library.

NodeJS Promises

Promises are a very powerful, and important aspect of building well structured JavaScript applications. JQuery introduced the concept of promises; and libraries such as angular have adopted them. What is a promise? A promise represents the result of an asynchronous operation; you are “promised” that the result of an asynchronous operation will eventually return. A…