Created
August 17, 2020 05:59
-
-
Save tzkmx/98842d36f330d518d449750233d995cb to your computer and use it in GitHub Desktop.
minio tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const minio = require('minio') | |
const config = { | |
endPoint: 'XXXX.digitaloceanspaces.com', | |
port: 443, | |
useSSL: true, | |
accessKey: 'XXXXX', | |
secretKey: 'XXXXXX' | |
} | |
const s3Client = new minio.Client(config) | |
const bucketName = process.argv[2] || 'demo-test' | |
const objectsStream = s3Client.listObjects(bucketName, '', true) | |
objectsStream.on('data', function(obj) { | |
console.log(obj) | |
}) | |
objectsStream.on('error', function(e) { | |
console.error(e) | |
}) | |
console.log('query bucket') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment