add verbose to cli

This commit is contained in:
Gabriel Pastori
2023-11-30 15:40:52 -03:00
parent fc85a4bce8
commit 3e003725d9
7 changed files with 44 additions and 4 deletions

View File

@@ -1,12 +1,14 @@
const build = require('../utils/build.js');
const verifyPm2Installation = require('../utils/verifyPm2Installation.js');
const detectPm2ProcessId = require('../utils/detectPm2ProcessId.js');
const { verbose } = require('../utils/verbose')
const { exec } = require('child_process')
const path = require('path')
module.exports = async (argv) => {
const port = argv.port || 9615;
await verifyPm2Installation(true);
await build();
@@ -20,6 +22,7 @@ module.exports = async (argv) => {
console.log('⚙️ Starting PM2 process')
console.time('⚙️ Starting PM2 process')
verbose('🗣️ Port: ', port)
exec(`pm2 serve dist/ ${port} --name evolution-manager --spa`, { cwd: path.join(__dirname, '..', '..') }, (err, stdout) => {
if (err) {
console.error(err)