8 Working with serverless computing

 

This chapter covers

  • Defining serverless
  • Explaining what serverless means for the Jamstack
  • Describing serverless options
  • Building serverless functions with Netlify
  • Building serverless functions with Vercel

In the last chapter, we discussed a few different ways you can add dynamic elements back into your Jamstack sites. These were done via external services set up specifically to serve a need, for example, Google Forms letting you design and accept feedback for a form.

While the availability of these services continues to grow in both number and variety, there are certain things that simply do not make sense as external services, including very particular business logic for your Jamstack site that only you know how to develop. This is where serverless computing, and specifically functions as a service, come into play.

8.1 What is serverless computing?

Let’s get this out of the way. There are still servers in serverless computing. Just like how we don’t actually build infrastructure in real clouds, serverless technology doesn’t magically remove the need for physical hardware. Serverless computing is about removing the need to worry about the servers. It’s about getting all the benefit of what the server provides without the boring work of actually maintaining a server.

There are a wide variety of services that can fall under the serverless definition. Here are just a few:

8.2 Building serverless functions with Netlify

8.2.1 Adding serverless computing to Camden Grounds

8.2.2 More on Netlify functions

8.3 Building serverless functions with Vercel

8.3.1 Your first Vercel serverless function

8.3.2 Vercel functions with dynamic path support

8.3.3 Adding serverless functions to Camden Grounds (again)

Summary