0.0.1 • Published 3 years ago

node-upload-util v0.0.1

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

文件上传

Build Status Coverage Status GitHub license

Install

yarn add node-upload-util
# or
yarn add global node-upload-util

Usage

  • Use in cli

cli

  • Import in your code
import { run } from 'node-upload-util';

run({
  ftp: {
    host: '1.1.1.1',
    port: 21,
    user: 'username',
    password: '123456',
    files: ['file.txt', 'dir'],
    rootPath: '/',
    destRootPath: '/home/ftp'
  },
  sftp: {
    host: '1.1.1.1',
    port: 22,
    user: 'username',
    password: '123456',
    files: ['file.txt', 'dir'],
    rootPath: '/',
    destRootPath: '/home/sftp'
  },
})

Dev

# clone code
git clone https://github.com/hangboss1761/upload-util

cd upload-util

# install dependencies
yarn

# start dev mode
yarn dev

# build for production
yarn build
  • cli
npm link

upload start

Test

yarn test
# or
yarn test:cover