Experimenting running a shell script from an API route and router handler, and streaming data to the client-side using Next.js.
app/apiv2/route.ts
file contains the route handler implementation.
pages/api/process.ts
file contains the API route implementation.
// Clone repository
git clone https://github.com/ivanatias/sh-script-api-route.git
// Start local server
npm run dev