mirror of
https://github.com/EvolutionAPI/evolution-manager.git
synced 2025-07-20 10:16:43 -06:00
Add cwd option to pm2 serve command
This commit is contained in:
parent
ddfe15a829
commit
d1653c3408
@ -2,6 +2,7 @@ const build = require('../utils/build.js');
|
|||||||
const verifyPm2Installation = require('../utils/verifyPm2Installation.js');
|
const verifyPm2Installation = require('../utils/verifyPm2Installation.js');
|
||||||
const detectPm2ProcessId = require('../utils/detectPm2ProcessId.js');
|
const detectPm2ProcessId = require('../utils/detectPm2ProcessId.js');
|
||||||
const { exec } = require('child_process')
|
const { exec } = require('child_process')
|
||||||
|
const path = require('path')
|
||||||
|
|
||||||
module.exports = async (argv) => {
|
module.exports = async (argv) => {
|
||||||
const port = argv.port || 9615;
|
const port = argv.port || 9615;
|
||||||
@ -19,7 +20,7 @@ module.exports = async (argv) => {
|
|||||||
|
|
||||||
console.log('⚙️ Starting PM2 process')
|
console.log('⚙️ Starting PM2 process')
|
||||||
console.time('⚙️ Starting PM2 process')
|
console.time('⚙️ Starting PM2 process')
|
||||||
exec(`pm2 serve dist/ ${port} --name evolution-manager --spa`, (err, stdout) => {
|
exec(`pm2 serve dist/ ${port} --name evolution-manager --spa`, { cwd: path.join(__dirname, '..', '..') }, (err, stdout) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
return
|
return
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "evolution-manager",
|
"name": "evolution-manager",
|
||||||
"version": "0.2.6",
|
"version": "0.2.7",
|
||||||
"main": "dist",
|
"main": "dist",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
Loading…
Reference in New Issue
Block a user