0.0.2 • Published 2 years ago

auto-upload-ip-to-minio v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

auto-upload-ip-to-minio

upload ip to minio by cron

install

npm i auto-upload-ip-to-minio -S

usage

const { createTask } = require('auto-upload-ip-to-minio')
const minio = require('minio')

const client = new minio.Client({
  endPoint: 's3.example.com',
  port: 443,
  useSSL: true,
  accessKey: 'MINIO_ACCESS_KEY',
  secretKey: 'MINIO_SECRET_KEY'
})

createTask({
  client,
  list:[
    {
      bucket: 'bucket-a',
      object: 'ddns/a.example.com',
      jsonpath: '$["interfaceName"][?(@.family=="IPv4")].address'
    },
    {
      bucket: 'bucket-a',
      object: 'ddns/b.example.com',
      jsonpath: '$["interfaceName"][?(@.family=="IPv4")].address'
    }
  ],
  cronString: '* * * * * *'
})

more

jsonpath

cron