Next.js Discord

Discord Forum

Run custom CLI commands using Nextjs/Typescript project

Answered
American black bear posted this in #help-forum
Open in Discord
Avatar
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
Answered by American black bear
View full answer

1 Reply

Avatar
American black bearOP
Answer