Files: c5c7a8ffadbd51aa28a5f3f096fe43f69405da44 / test / test-79-npm / s3 / s3.js
421 bytesRaw
1 | ; |
2 | |
3 | var s3 = require('s3'); |
4 | |
5 | var client = s3.createClient({ |
6 | s3Options: { |
7 | accessKeyId: 'ABRACADABRABRACADABR', |
8 | secretAccessKey: 'TdTdTdTdTdTdTdTdTdTdTdTdTdTdTdTdTdTdTdTd' |
9 | } |
10 | }); |
11 | |
12 | var ee = client.listObjects({ |
13 | s3Params: { |
14 | Bucket: 'enclosejs' |
15 | } |
16 | }); |
17 | |
18 | ee.on('error', function (error) { |
19 | if (error) { |
20 | if (error.message.indexOf('does not exist') >= 0) { |
21 | console.log('ok'); |
22 | } |
23 | } |
24 | }); |
25 |
Built with git-ssb-web