New Node Server serving pages - DB not connecting

This morning I felt like I was walking on water - set up my first node.js server.

Pages were showing… but cannot use the login page. Getting this error:

{
“status”: “500”,
“code”: “ENOTFOUND”,
“message”: “getaddrinfo ENOTFOUND db”,
“stack”: “Error: getaddrinfo ENOTFOUND db\n at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:72:26)\n --------------------\n at Protocol._enqueue (/home/ppswealthuser/ppswealthmentor.co.za/public/node_modules/mysql/lib/protocol/Protocol.js:144:48)\n at Protocol.handshake (/home/ppswealthuser/ppswealthmentor.co.za/public/node_modules/mysql/lib/protocol/Protocol.js:51:23)\n at Connection.connect (/home/ppswealthuser/ppswealthmentor.co.za/public/node_modules/mysql/lib/Connection.js:116:18)\n at /home/ppswealthuser/ppswealthmentor.co.za/public/node_modules/knex/lib/dialects/mysql/index.js:66:18\n at new Promise ()\n at Client_MySQL.acquireRawConnection (/home/ppswealthuser/ppswealthmentor.co.za/public/node_modules/knex/lib/dialects/mysql/index.js:61:12)\n at create (/home/ppswealthuser/ppswealthmentor.co.za/public/node_modules/knex/lib/client.js:247:39)”
}

Hope one of the guru’s can help…

Community Page
Last updated: