mango-cms 0.2.18 → 0.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.js +3 -0
- package/default/package.json +1 -1
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -559,6 +559,7 @@ async function checkPM2() {
|
|
|
559
559
|
// Helper function to manage PM2 process
|
|
560
560
|
async function managePM2Process(settings) {
|
|
561
561
|
const processName = `${settings.siteName.toLowerCase()}-mango`;
|
|
562
|
+
const name = settings.siteName.toLowerCase()
|
|
562
563
|
|
|
563
564
|
try {
|
|
564
565
|
// Check if process exists
|
|
@@ -568,9 +569,11 @@ async function managePM2Process(settings) {
|
|
|
568
569
|
if (processExists) {
|
|
569
570
|
console.log(`Reloading PM2 process: ${processName}`);
|
|
570
571
|
execSync(`pm2 reload ${processName}`);
|
|
572
|
+
execSync(`pm2 reload ${name}`);
|
|
571
573
|
} else {
|
|
572
574
|
console.log(`Starting new PM2 process: ${processName}`);
|
|
573
575
|
execSync(`pm2 start index.js --name ${processName}`, { cwd: './build' });
|
|
576
|
+
execSync(`pm2 start index.js --name ${name}`, { cwd: './dist' });
|
|
574
577
|
}
|
|
575
578
|
} catch (error) {
|
|
576
579
|
console.error('Error managing PM2 process:', error.message);
|
package/default/package.json
CHANGED