Connecting a NestJS commander CLI project to a server project #23
Unanswered
minericpark
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I don't know of a way to use the current instance that a server has, as that would be a separate process. What you could do is create libraries for the services you want to be able to access in both, and then the CLI can re-use the same service code the server has. Otherwise, you'll probably need to make GQL/HTTP calls to the server. Interesting use case though, I'll see if I can figure something out |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I'll break down the concept. I have two projects currently in a monorepo:
I was working on developing a CLI that could call various services from a separate server project I've prototyped using NestJS. I was wondering how I would be able to connect them together? Would I have to use manual GraphQL/REST calls from the CLI application, or how would I run both an instance of the server with the CLI, then access the server services?
I've looked at the ogma/cli package, though it doesn't seem like it's calling any services from modules outside of that project, and haven't found any other examples and resources successfully :(
Beta Was this translation helpful? Give feedback.
All reactions