-
-
Notifications
You must be signed in to change notification settings - Fork 144
Description
I'm developing a micro-services backend using Foal TS.
In the development environment, I use a "multiple console" runner. I launch every service at the same time.
The problem is that when I run the Foal 4 projects, it never starts, I have to reboot manually the services until it starts working. And, also, it takes sometimes like 10 minutes.
In the next image: Metr is working, Coord, Cred, High, Iden, Logg, Stge and Stor are not working. Mail and Func are not FoalTS services, so please ignore them.
That is not what happens if I run all the Foal V2 projects.
In the next image: All services are working.
I'm sure the problem is Supervisor, because the problem was fixed after replacing it with another tool (a popular tool named nodemon
).
https://www.npmjs.com/package/nodemon
This not only solves the problem, but also starts the project faster.
My new command for npm run dev
is:
{
"dev": "npm run build && concurrently -r \"tsc -p tsconfig.app.json -w\" \"nodemon --delay 2 -w ./build -w ./config -e js,json,yml ./build/index.js\"",
}