I’ve been exploring async/await in Node.js 8. This new feature is totally wicked. It could change our promise-based code becomes cleaner and more readable. Let’s see how it works.
I got an error when deploying my Node.js app into AWS Elastic Beanstalk (EB). The error said
Error: connect ETIMEDOUT at errnoException (net.js:901:11) at Object.afterConnect [as oncomplete] (net.js:892:19) -------------------- at Protocol._enqueue (/var/app/current/node_modules/mysql/lib/protocol/Protocol.js:110:26) at Protocol.handshake (/var/app/current/node_modules/mysql/lib/protocol/Protocol.js:42:41)
My Node.js app using node-mysql module to access database. You can see “mysql” in the error statement. Seeing from errors, this must be related with database. I use Amazon Relational Database Service (RDS) and my node.js app is configured to connect with it.
Have you ever got a problem when you need to use two Node.js version on same machine? In my past work, I faced the problem when some libraries didn’t work in Node.js 0.8.x but works in 0.10.x. So, I need to install more than one Node.js version on my machine. Then I use NVM.