import * as Minio from "minio";

const minioClient = new Minio.Client({
  endPoint: process.env.MINIO_HOST ?? "localhost",
  port: process.env.MINIO_PORT ? +process.env.MINIO_PORT : undefined,
  useSSL: !!process.env.MINIO_SSL,
  accessKey: process.env.MINIO_ACCESS_KEY ?? "",
  secretKey: process.env.MINIO_SECRET_KEY ?? "",
});

export default minioClient;
