require('dotenv').config();
const FtpDeploy = require("ftp-deploy");
const ftpDeploy = new FtpDeploy();
const config = {
host: process.env.FTP_HOST,
user: process.env.FTP_USER,
password: process.env.FTP_PASSWORD,
port: 21,
localRoot: __dirname + "/src",
remoteRoot: "/htdocs/ber/",
include: ["*", "**/*"], // this would upload everything except dot files
// include: ["*.php", "dist/*", ".*"],
deleteRemote: true,
forcePasv: true,
sftp: false,
};
ftpDeploy
.deploy(config)
.then((res) => console.log("finished:", res))
.catch((err) => console.log(err));