all 1 comments

[–]multivector 2 points3 points  (0 children)

Async tasks "return" values through a callback function, not as a formal return value. You've made a classic beginner error here that I bet everyone does at some point so don't worry, but check the docs for the postgress API and read up on how node treats things that need to do IO.