nodejs promise tutorial

Tutorial Steps

    1. Run npm init
$ git clone https://github.com/jspenc72/node-promise-tutorial
$ cd node-promise-tutorial
$ mkdir mytutorial
$ cd mytutorial
$ npm init
    1. Add Bluebird promis library as a dependency
$ npm install bluebird -save
    1. Create index.js
$ touch index.js

Install dependencies:

$ npm install

Promise Code Sample

var Promise = require('bluebird');

var myFunction = function(){

	return new Promise(function(resolve, reject){

	})
}