Menu

Helpers for Serverless Node.js Functions
📰
0

Helpers for Serverless Node.js Functions

Vercel News·Luc Leray·4 days ago
#Ovwvrsoc
#vercel#request#response#json#example#article
Reading 0:00
15s threshold

Migrating to serverless Node.js functions or creating new ones can mean that some of the tools and frameworks you used previously are not suitable anymore. With today's feature release, we want to solve this problem by providing you with a set of default helpers exposed within your Node.js function . Link to heading What's New The recent update to serverless Node.js functions on Vercel introduces six default methods to the request and response payload: request.query request.cookies request.body response.status() response.json() response.send() In order to access any of these methods, no changes are required on your side. Link to heading Performance With the introduction of helpers, your application receives a gain in performance when compared to a basic Express.js application: NOTE: The benchmarks above are used to showcase the performance difference between serverless Node.js functions on Vercel and the Express.js framework.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More