I am writing a simple function to query my database with Knex in Node. Everything I've tried returns Promise { <pending> }
Function to query the DB:
const queryTable = async () => {
const data = await knex
.select("*")
.from(TABLE_NAME)
return data;
};
I've tried calling the function in it's own async/await wrapper, and I've tried the .then() callback after... No luck. Any leads appreciated!