two problems in such code: https://github.com/roaiven/ello/blob/22fea3e6e75d61fa0e71ff3f289d178edfa50a90/server/db/index.js - you should use sql files via [QueryFile](http://vitaly-t.github.io/pg-promise/QueryFile.html) - you should not create loose promise requests, ones without `.than` + `.catch`.
two problems in such code: https://github.com/roaiven/ello/blob/22fea3e6e75d61fa0e71ff3f289d178edfa50a90/server/db/index.js
.than+.catch.