Hacker News new | past | comments | ask | show | jobs | submit login

I'm not sure if I'm doing things quite right, but I got a simply Postgres server script working.

https://gist.github.com/radiosilence/6826930

Could this be improved?




It looks like you are creating wrappers manually, that could be improved. Look into both overloads of [`Promise.promisify`](https://github.com/petkaantonov/bluebird/blob/master/API.md#...)


I did try to Promisify the pg library but it didn't seem to work, and just broke :(


Hmm. Can you post your code and description of the problem as an issue? https://github.com/petkaantonov/bluebird/issues



If it's useful, here's an app I converted to promises: https://github.com/artillery/pull-request-viewer/blob/master...

It uses Q, not bluebird, but should still be relevant.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: