Categories: Software Development

node-oauth-libre 0.9.15 ALPHA

I’m very excited. After starting a fork of node-oauth-libre a month ago, I have implemented a feature that many people have wanted for months: Promises instead of callbacks.

Promises are a way of escaping from Node’s callback hell.

node-oauth-libre now has support for promises thanks to the bluebird library. This support is optional and does not break compatibility with existing uses of node-oauth. To use it, you must explicitly import it.

Click here to check out the release notes for node-oauth-libre 0.9.15 ALPHA. The install and usage instructions are there and a link to some examples.

Here’s an example of using OAuth 1.0 promises:

https://gist.github.com/omouse/0bf79ac1d1edf6a036482e6cb0de9a8f

Using Sequelize with Promises (with and without Q)

Using Sequelize with Promises (with and without Q)

Here is a basic example of using Sequelize with promises using the Q Promises library.

https://gist.github.com/omouse/9401609

Q is basically a way for you to use Promises in Node.js. You can use it with Sequelize to make it easier to perform the SQL operations through the library.