leancloud-backup-data-module

2.0.0 • Public • Published

leancloud-backup-data-module

export leancloud data using cronJob

NPM

Install

$ npm install --save leancloud-backup-data-module

Usage

const backupModule = require('leancloud-backup-data-module');

const CronStatement = '* * 7 * * *' 
// CronJob expression, for example, it will run at AM7:00

const config = {
  leancloudId: 'leancloudId',
  leancloudKey: 'leancloud_master_key' + ',master',
  email: 'yourEmail'
}
// leancloudId: leancloud app id,
// leancloudKey: leancloud master key, NOTICE: ',master' CANNOT be removed

const DOWNLOAD_PATH = './backup/folder/'
// download backup file path

const isUS = true // is leancloud application in us node or not 
// if using leancloud US : true

backupModule(CronStatement, config, DOWNLOAD_PATH, isUS)

Package Sidebar

Install

npm i leancloud-backup-data-module

Weekly Downloads

2

Version

2.0.0

License

ISC

Last publish

Collaborators

  • tsu7710785