Socket
Socket
Sign inDemoInstall

ftp-cmd-upload

Package Overview
Dependencies
10
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ftp-cmd-upload

Build files and upload to ftp server


Version published
Weekly downloads
4
Maintainers
1
Created
Weekly downloads
 

Readme

Source

ftp-cmd-upload

Build files and upload to ftp server

###1.create ftp.config in root

ftp.config

the file is in soucefiles,jsonn5 config. Config the file, it will remove the remotePath first,and make sure the MLSD is disenable
the remotePath must start with /

{
  uploadconfig: {
    uploadPath: './dist/', /** the local path to upload **/
    ftpConnectConfig: {
      user: 'test',
      host: '127.0.0.1',
      port: 21,
      password: '131415926',
    },
    remotePath: '/testdist', /** the ftp server path to upload, must start with / **/
    ignoreList: ['upload','update'] /**this folders will not be removed **/
  }
}

###2.create *.js to start(you can use node *.js) upload

const tools = require('ftp-cmd-upload');
Start();
async function Start(){
    await tools.cmdTool.Run('npm run build'); // run the build action
    await tools.ftpTool.UploadFiles(); //start to upload
}

Keywords

FAQs

Last updated on 24 Apr 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc