New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ftpkick

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ftpkick

A module that will literally kick all your files to a remote FTP server

  • 0.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

ftpkick

Simply a module that kicks your folder out the door and up onto your FTP server of choice. If you don't like the word "kick", then you're allowed to silently replace it with "deploy" in your mind.

$ npm install ftpkick

This module was heavily inspired by some code written by @jarl-dk in CoffeeScript.

Example

var ftpkick = require('ftpkick');

var args = {
  host: 'mytesthost',
  user: 'developer',
  password: 'supersecret'
};

ftpkick.connect(args).then(function(kicker) {
  console.log('Uploading to /myfolder');
  kicker.kick('./build', '/myfolder').then(function() {
    console.log('Successfully uploaded to /myfolder');
    kicker.disconnect()
  }, function(e) {
    console.log('Failed to upload', e);
  });

  kicker.on('uploaded', function(file) {
    console.log('Uploaded file: ', file);
  });

  kicker.on('uploading', function(file) {
    console.log('Uploading file: ', file);
  });

  kicker.on('savedcheckfile', function(file) {
    console.log('Saved checkfile with path: ', file);
  });
});

API

ftpkick.connect(parameters) -> Promise

Connection parameters are directly passed on to the ftp package, so go look there for docs.

The .connect function returns a promise of a Connection object.

Connection#kick(localDirectory, targetDirectory, checkfile) -> Promise

As you might've guessed, the localDirectory is the directory you want to kick while the targetDirectory is the target where all your files hopefully will land.

The checkfile parameter, is an optional filename where the ctime of all uploaded files will be stored. If provided ftpkick will check against this file to make sure that it only uploads updated files. The checkfile is stored in the OS' temporary directory.

The method returns a promise, that will resolve on success and reject on failure

Connection#disconnect()

Call this when you want to end the FTP connection (after a kick)

Keywords

FAQs

Package last updated on 17 Dec 2013

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc