Open ujjavaljani opened 3 years ago
module.exports = {
apps: [
{
name: "app-namne",
script: "./build/index.js",
watch: true,
ignore_watch: [
".git",
".md",
],
time: true,
env: {
PORT: process.env.PORT,
},
},
],
};
npm run build && env-cmd -f ./environments/.env pm2 start pm2.config.js",
Hello, I am using env-cmd in my typescript application. for production I am creating node js build using
tsc
and after build when I tried to pass custom env file then it throws error like .env file could not found.I am trying to run command
npm run pm2:start:qa
.Thanks in advance.