Posts Tagged ‘ Node ’

Amazon Linux Apache 2.4 reverse proxy with SSL to serve Node.js application

2017/10/09
By
Modified: 2017/10/09
SSL Test Report

Recently, I spent about 36 hours researching, and thinking, and trying, and learning a lot about Apache server before I could crack this one.  After I found a solution, a had a long <VirtualHost> entry.  In this article I present only entries that are required for reverse proxy to work and your Node.js app still to be aware of client IP address. Problem: You want Apache 2.4 to be your front end for your Node.js application.  All the transaction should occur over HTTPS. Your visitors do not have to specify a post number in URL. I do not cover here: – how to install and configure Node.js; – how to get a…

Read more »


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 »