deleted some useless stuff and backend integration

This commit is contained in:
2020-05-25 21:43:19 +03:00
parent e1abcdb379
commit 86f632d72b
21 changed files with 128 additions and 109 deletions

View File

@@ -1,5 +1,6 @@
const FtpDeploy = require("ftp-deploy");
const ftpDeploy = new FtpDeploy();
const ftp = new FtpDeploy();
const config = {
user: process.env.FTP_USER,
@@ -8,9 +9,7 @@ const config = {
port: process.env.FTP_PORT,
localRoot: __dirname + "/../frontend",
remoteRoot: "/public_html/car/",
// include: ["*", "**/*"], // this would upload everything except dot files
include: ["build/**"],
// e.g. exclude sourcemaps, and ALL files in node_modules (including dot files)
exclude: ["build/**/*.map", "node_modules/**", "node_modules/**/.*", ".git/**"],
// delete ALL existing files at destination before uploading, if true
deleteRemote: false,
@@ -18,9 +17,9 @@ const config = {
forcePasv: true
};
ftpDeploy
ftp
.deploy(config)
.then(res => {
.then(() => {
console.log("Deployment to FTP finished");
return;
})