const Minio = require('minio') const endPoint = process.env.AWS_ENDPOINT const accessKey = process.env.AWS_ACCESS_KEY const secretKey = process.env.AWS_SECRET_KEY const region = process.env.AWS_REGION const port = parseInt(process.env.AWS_PORT) let client if (process.env.NODE_ENV === 'test') { client = new Minio.Client({ endPoint, useSSL: true, accessKey, port, secretKey, region, }) } else { client = new Minio.Client({ endPoint, useSSL: true, accessKey, secretKey, region, }) } module.exports = client