Posts Tagged ‘ Jade ’

Node.js -understanding callback when you have to wait

2017/09/12
By
Modified: 2017/09/10
Node.js -understanding callback when you have to wait

This post demonstrates: – how to write a callback function so that results from your database are returned by the time you are ready to render; – how to use multi-field LIKE syntax in a SELECT statement. The most important thing to understand in Node.js is a callback mechanism and its purpose.  It is all fine and dandy, when you just type something for the training session, or copying code from an Internet example, but things are different, when you need to write you own function that must rely on a callback function.  Here I will show no-blocking code that would process POST request, call for MySQL to execute a SELECT query and…

Read more »