Skip to content

Commit

Permalink
finished testing with mock s3 endpoint container
Browse files Browse the repository at this point in the history
  • Loading branch information
joao-viegas committed Aug 19, 2019
1 parent abf0bd6 commit b2ec372
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 769 deletions.
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,26 @@ BUCKET WRAPPER
`npm install @jtviegas/bucket-wrapper`

## Usage

```javascript
var bw = require('@jtviegas/bucket-wrapper');
bw.listObjects = ("bucket", "bucketPrefix", (e,r) => {


let config = {
WINSTON_CONFIG: { ... }
, AWS_REGION: 'eu-west-1'
, AWS_API_VERSION: '2006-03-01'
}

var bw = require('@jtviegas/bucket-wrapper')(config);

bw.listObjects = (bucket, bucket_key, (e,r) => {
if(e){
//...do your error handling
}
else {
// ... do whatever you want
}
});
```


Check the test folder in source tree.
## Tests

`npm test`
Expand Down

0 comments on commit b2ec372

Please sign in to comment.