This commit is contained in:
Artur Gurgul 2024-10-17 23:51:03 +02:00
parent d086c1d493
commit 0f1d41a991
30 changed files with 1013 additions and 1536 deletions

4
ssh.js
View file

@ -1,9 +1,5 @@
const Client = require('ssh2-sftp-client')
// Read the private key from the default location
const privateKey = fs.readFileSync(path.resolve(process.env.HOME, '.ssh/id_rsa'))
async function uploadDirectory(serverConfig, localDirPath) {
const sftp = new Client()
await sftp.connect(serverConfig)