Skip to content

Instantly share code, notes, and snippets.

@tzkmx
Created August 17, 2020 05:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tzkmx/98842d36f330d518d449750233d995cb to your computer and use it in GitHub Desktop.
Save tzkmx/98842d36f330d518d449750233d995cb to your computer and use it in GitHub Desktop.
minio tests
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