2.0.0 • Published 7 years ago

leancloud-backup-data-module v2.0.0

Weekly downloads
7
License
ISC
Repository
github
Last release
7 years ago

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)