New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

instadeploy

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

instadeploy

Instantly Deploy a folder to multiple servers

latest
Source
npmnpm
Version
0.3.5
Version published
Weekly downloads
4
100%
Maintainers
1
Weekly downloads
 
Created
Source

InstaDeploy

InstaDeploy Watches a folder and deploys using SFTP to multiple servers when changes are made. It is great for use in source deployment where a large number of hosts are at play.

Installation

npm install -g instadeploy

Usage

You can use either instadeploy or deploy cmd/terminal command.

Setup a new host

instadeploy add <unique_name> <host_ip> <username> <password> <unique_remote_path> <privateKey>

Ignore development folders (Ignore follows Minimatch's Glob Expressions Format)

instadeploy ignore ".gitignore" "node_modules/**" ".git/**" <pattern4> <pattern5> ...

Watch a folder (use -v or -verbosity to get accurate input)

instadeploy watch <local_path> <common_remote_path>

Remove a host

instadeploy remove <name>

Remove an ignore pattern

instadeploy allow <pattern>

API

Instance -> InstaDeploy(Array:ObjectsHosts, Options) Example:

var fs = require('fs');
var InstaDeploy = require('instadeploy');
var Deployer = new InstaDeploy([
  { name: 'test', host: '127.0.0.1', port: 8085, username: 'root', password: 'test', path: 'uploads', privateKey: fs.readFileSync('/path/to/key') },
  { name: 'host2', host: '127.0.0.1', port: 8045, username: 'notroot', password: 'test2', path: 'test', privateKey: fs.readFileSync('/path/to/key2') }
], {
  ignore: ['node_modules\\**', '.gitignore']
})

Note: If a password is not provided the user will be prompted for it. To disable this pass a 'noprompt' attribute with every remote connection object that is passed to InstaDeploy.

Options

  • maxConcurrentConnections: <Number> 5
  • queueTime: <Time:MS> 1500
  • ignore: <Array> ['.git', 'node_modules']

Events

  • attempt: (args-> <Object>Host, <Int>NoOfRetries) Emitted when a new connection attempt is made
  • connect: (args-> <Object>Host, <Int>NoOfRetries, <Object>Handler) Emitted when a connection is made to one of the hosts
  • disconnect: (args-> <Object>Host, <Int>NoOfRetries, <Object>Handler) Emitted when a connection is lost
  •   --------
  • uploadStarted: (<String>RelativePath, <String>AbsolutePath, <String>RemotePath) Emitted when a file has been queued for upload
  • uploaded: (args-> <String>RelativePath, <String>AbsolutePath) Emitted when an upload has successfully completed
  • ignored: (args-> <String>RelativePath, <String>AbsolutePath) Emitted when a file has been ignored
  • failed: (args-> <Error>Error, <String>RelativePath, <String>AbsolutePath) Emitted when an upload has failed
  •   --------
  • start: (args-> <Int>NumberOfItems) Emitted when a new batch is queued for upload
  • end: (args-> None) Emitted when all items of the batch have been uploaded

License

MIT © Schahriar SaffarShargh - Full License

Keywords

deploy

FAQs

Package last updated on 24 Oct 2015

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