safe-deploy-pm2
v1.0.4
Published
Zero-downtime build & deploy tool with symlink switching and PM2 ecosystem generation
Maintainers
Readme
safe-deploy
Zero-downtime build & deploy tool with symlink switching and PM2 ecosystem generation.
Port des ecosystems sollte nicht Port des dev Server sein.
Usage
import { SafeDeployPm2 } from "safe-deploy";
const safeDeployPm2Instance = new SafeDeployPm2({
apps: [
{
name: "Express",
buildCmd: "npm run build",
outputPath: "dist",
script: "cmd",
args: "/c npm start",
out_file: process.cwd(),
error_file: process.cwd(),
watch: false,
restart_delay: 4000,
max_restarts: 10,
exec_mode: "fork",
instances: 1,
env: {
PORT: 65020,
},
},
],
distPath: "C:\\vs\\Tests",
});
await safeDeployPm2Instance.deploy();