Thanks to Estus Flask this has been solved:
Using const {rows}
in my second query instead of const {user}
everything is now behaving properly... i.e.:
(async () => {
const {rows} = await pool.query(`SELECT * FROM accounts WHERE username = '${req.body.username}'`);
console.log(rows);
})();
Just in case anyone else is having this issue!!!
Mureinik's answer is also good, but for completness for noobs like me, the other, beetter(?) way of putting the results into a variable name of your choice say varName should you really need to would be:
(async () => {
const {rows: varName} = await pool.query(`SELECT * FROM accounts WHERE username = '${req.body.username}'`);
console.log(varName);
})();
Thank you very much to Estus for solving this instantly in the comments!