AlexPshul / nxazure

MIT License
16 stars 7 forks source link

How to use function in conjuction with `dependsOn`? #39

Open vladkasianenko opened 5 days ago

vladkasianenko commented 5 days ago

Hello.

I have a couple of Azure Functions and Angular. When starting Angular, I want it automatically to start some functions.

Right now, if I use dependsOn: ["myFunc1:start", "myFunc2:start"], it never ends. I think, the executor should somehow let the system know that the function started.

AlexPshul commented 4 days ago

I don't think that this is possible, since this is by design. The way functions apps run locally is by listening to the port and then propagating the logs to the console. I use NX to simply pass through all the logs back to your initial console, but the underlying func start command never ends.

What I recommend doing is to simply use nx run-many to start as many functions in parallel as you need. Then, open another console and start your angular project. You can add your own target for your Angular project, call it also start and then just run nx run-many --target=start --all --parallel=<INSERT NUMBER OF PROJECTS>