/sh-script-api-route

Experimenting running a shell script from an API route and streaming data to the client-side using Next.js.

Primary LanguageTypeScript

Demo - Running shell script from API routes and route handlers

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.

Run locally:

// Clone repository
git clone https://github.com/ivanatias/sh-script-api-route.git

// Start local server
npm run dev