1

I have been referencing this post: How can I run multiple npm scripts in parallel?

However, neither of my apps launch with npm run dev. Both apps exit with code 1.

My package.json:

  "scripts": {
  "start": "ng serve",
  "start:lt": "ng serve --configuration=lt",
  "dev": "concurrently --kill-others \"npm start\" \"npm start:lt\""
}

And yes, I have concurrently installed.

Mantas
  • 83
  • 1
  • 10

1 Answers1

2

you can use https://www.npmjs.com/package/foreman module to start app.

first, you need Procfile with commands, you plan to execute in parallel

start: ng serve
start_lt: ng serve --configuration=lt

second, add it to package.json

"scripts": {
  "start":"nf start"
}

third - define PORT variable in .env file

PORT=4201

and, finaly, you can start your applicaiton by npm start - it will start foreman executable, that starts both start and start_lt components in parallel

vodolaz095
  • 6,680
  • 4
  • 27
  • 42