0

I need to run an NestJS server who can start and stop another NestJS server when accessing endpoints from the first one. An be able to stream the logs of the second one.

I have no idea how to do that. I tried with child-process but it doesn't work.

Maybe someone has an idea ? Thanks by advance

G .E
  • 21
  • 1
  • 3
    Can you clarify why the second/other services can't be running all the time? – Alexander Staroselsky Apr 15 '21 at 22:07
  • I want to use a master API who can handle a child API. The child API will process config files to run specific code at start, generated by the master. So I will need to stop and restart the child when a config file is created. – G .E Apr 16 '21 at 09:34
  • 1
    Maybe a different question, what type of operations and how many will this child service do specifically as they are started and stopped? – Alexander Staroselsky Apr 16 '21 at 15:01
  • 1
    Are you sure you don't want something like a [background processing queue](https://docs.nestjs.com/techniques/queues) instead? – Alex Wayne Apr 16 '21 at 17:42

0 Answers0