Files: d456a6cc8589489e558e6164750474ed2cfc961e / 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