Skip to content

A node library that pushes files the remote server via the ssh.

License

Notifications You must be signed in to change notification settings

windyeasy/npssh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npssh

  • A node library that pushes files the remote server via the ssh.
  • The library is based on node-ssh.

Installation

pnpm add npssh -D

And create .npssh.cjs | .npssh.json | .npssh.yml in your project root:

module.exports = {
  host: "localhost",
  username: "root",
  password: "123456", // or privateKeyPath: "/path/to/private/key"
  from: "./dist",
  to: "/root/dist",
  isDeleteRemoteFiles: true, // Whether to delete all the files in the remote folder. default value: false 
}
  • if you want protect your's private information, you need to add .npssh to .gitignore.

Add script for package.json:

For example:

"scripts": {
  "push": "npssh"
}

License

It is MIT.

About

A node library that pushes files the remote server via the ssh.

Resources

License

Stars

Watchers

Forks

Packages

No packages published