brew install mongodb
mkdir -p /data/dbEnsure that user account running mongod has correct permissions for the directory:
| var Aws = require('aws-sdk'); | |
| var sinon = require('sinon'); | |
| // Only works for 'createBucket', 'update' and a few others since most API methods are generated dynamically | |
| // upon instantiation. Very counterintuitive, thanks Amazon! | |
| var createBucket = sinon.stub(Aws.S3.prototype, 'createBucket'); | |
| createBucket.yields(null, 'Me create bucket'); | |
| // For other methods, we can 'assign' the stubs to the proto, already defined function won't be overridden | |
| var listBuckets = Aws.S3.prototype.listBuckets = sinon.stub(); |