The Serverless Framework and Cloudflare Workers | What is the Serverless Framework?

The Serverless Framework enables developers to write provider-agnostic serverless architectures, and one of the providers it supports is Cloudflare Workers.

Share

Serverless and Workers

Learning Objectives

After reading this article you will be able to:

  • Understand what the Serverless Framework is
  • Understand how Cloudflare Workers integrates with the Serverless Framework

What is the Serverless Framework?

The Serverless Framework is a tool that helps developers create serverless applications that can be deployed via any serverless provider. Applications do not have to be written to the specifications of any particular vendor, and the framework will translate the code into the form necessary for deployment through whichever vendor the developer chooses. The Serverless Framework supports most major serverless computing vendors.

Although serverless providers are all slightly different in their deployment processes, their access controls, the programming languages they support, the tools they provide, and so on, applications built using the Serverless Framework are provider-agnostic, meaning they will perform as expected no matter which provider hosts the deployed software.

A developer can deploy their serverless application using the framework, which helps by adapting the code for the selected provider, and then by packaging and deploying the code.

In addition, the Serverless Framework provides features for building serverless architectures that the providers themselves may not offer, including version control, boilerplate code, and templates. As a result, developers are able to build products that have the benefits of serverless computing without having to do some of the grunt work associated with setting up the application and deploying the code.

How does Cloudflare Workers integrate with the Serverless Framework?

Cloudflare provides serverless compute services via Cloudflare Workers, a platform for building and deploying JavaScript functions that run on the Cloudflare edge network. Running code at the edge, as close to the end user as possible, helps to reduce latency and increase application performance. Each Worker can modify and respond to HTTP requests.

Cloudflare Workers is one of the providers supported by the Serverless Framework. Developers are able to build serverless applications that are then deployed as Cloudflare Workers. For developers whose applications run code in multiple places, using the Serverless Framework may be more efficient than writing their Workers within the Cloudflare Workers UI. This integration enables developers to take advantage of the benefits of both Workers and the Serverless Framework.

To read the technical details of how the integration works, see these docs.