Node.js Vercel Functions

Function streaming to be framework-agnostic on Vercel


Node.js Vercel Functions will soon support streaming by default, enabling the immediate return of results to users. The feature, which has already been enabled for frameworks like Next.js and SvelteKit, allows response headers to be sent immediately with the initial stream. In the event of a runtime error after these headers have been sent, the function will close the stream and log an error to Vercel. Logs, currently sent only after the function has finished responding, will now appear in near real-time as they happen. Hobby accounts will have streaming enabled by default from July 8th, 2024, with Pro and Enterprise accounts following suit on October 1st, 2024.

read full post