Run custom CLI commands using Nextjs/Typescript project
Answered
American black bear posted this in #help-forum
American black bearOP
Hi,
There's a service, used by multiple components, within our next project written in Typescript. We need a CLI command to run one of the methods of this service locally. It must not be part of the production build, but I want to be able to execute it locally, including loading the .env config.
Is there an easy way?
Thanks
There's a service, used by multiple components, within our next project written in Typescript. We need a CLI command to run one of the methods of this service locally. It must not be part of the production build, but I want to be able to execute it locally, including loading the .env config.
Is there an easy way?
Thanks
Answered by American black bear
Finally found the solution: https://stackoverflow.com/a/74669154/472789
1 Reply
American black bearOP
Finally found the solution: https://stackoverflow.com/a/74669154/472789
Answer