3 ms·
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 https://gist.gith
by antihero 13y ago
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 https://gist.github.com/radiosilence/6826930
Could this be improved?
- esailija 13y agoIt 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#promisepromisifyobject-target---object https://github.com/petkaantonov/bluebird/blob/master/API.md#...)
- antihero 13y agoI did try to Promisify the pg library but it didn't seem to work, and just broke :(
- esailija 13y agoHmm. Can you post your code and description of the problem as an issue? https://github.com/petkaantonov/bluebird/issues https://github.com/petkaantonov/bluebird/issues
- antihero 13y agoHere you go! https://github.com/petkaantonov/bluebird/issues/5 https://github.com/petkaantonov/bluebird/issues/5
- statico 13y agoIf it's useful, here's an app I converted to promises: https://github.com/artillery/pull-request-viewer/blob/master/prviewer.coffee#L392 https://github.com/artillery/pull-request-viewer/blob/master... It uses Q, not bluebird, but should still be relevant.