Skip to content

Commit

Permalink
Merge pull request #5 from Mapistry/new-init-pattern
Browse files Browse the repository at this point in the history
New init pattern
  • Loading branch information
alliejanoch committed Mar 21, 2016
2 parents bec1754 + b9f98f5 commit 632a18d
Show file tree
Hide file tree
Showing 4 changed files with 229 additions and 197 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ npm install aws-s3-promisified
#####Option 1: environmental variables.
Set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY as environment variables, then Node will configure AWS automatically.
```js
var aws = require('aws-s3-promisified');
var aws = require('aws-s3-promisified')();
```
#####Option 2: set environment variables manually
```js
var aws = require('aws-s3-promisified').initialize(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY);
var aws = require('aws-s3-promisified')({
accessKeyId: AWS_ACCESS_KEY_ID,
secretAccessKey: AWS_SECRET_ACCESS_KEY
});
```

All these functions return a Bluebird promise.
Expand Down
Loading

0 comments on commit 632a18d

Please sign in to comment.