While booting my Node.js app, I want to make a couple of synchronous calls to the PostgreSQL database to check some things before continuing the control flow. How can I achieve this using the node-postgres package?
Tell me more
×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
The only way to synchronize calls is to nest them in callbacks:
This can be a pain, and would be trivial in some other languages, but it is the nature of the beast. | |||||
|