About This Title

Pages: 275
Published: November 2024
ISBN: 9798888650714
In Beta

Serverless Apps on Cloudflare

Build Solutions, Not Infrastructure

by Ashley Peacock

Use serverless technologies to build applications that scale, more quickly and easily, and without worrying about deployment. Whether you’re writing an API, a full-stack app, or real-time code, harness the power of serverless on Cloudflare’s platform so you can focus on what you do best: delivering solutions. With hands-on instruction and code samples throughout, you’ll go from building a simple API to analyzing images with AI. And, when it’s time to launch, you’ll learn how to deploy your applications and websites automatically, and how to optimize their performance for production.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $31.95 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal

This book is in Beta, final version expected Nov 2024

Beta Books: What do I get?


For decades, applications have been built and deployed in a similar way: you write code, provision a server, and upload your code. Over the years, you’ve graduated from FTP or SSH to Docker and Kubernetes, but fundamentally you’ve just switched from owning to renting; you’re paying 24/7 for the server hosting your app. Serverless technologies change that model.

With serverless, you focus on writing code, and not how it’s deployed. You only pay for when your application code is executed, rather than paying for idle servers. In this book we’ll use Cloudflare, which was built from the ground up to be a serverless platform, but the same concepts apply to every serverless provider.

With this book, you’ll learn a better way to build applications, and you’ll see improved productivity and ease of deployment. From secrets to dependencies, such as databases and caches, Cloudflare has revolutionized how to build applications, and has made building applications easier and more fun. As you go through the book, you’ll learn in detail what serverless is, how it functions behind the scenes, and how to build serverless applications on Cloudflare. When you finish this book, you’ll understand how to think in terms of serverless functions, and you’ll have the experience of deploying and extending these apps as you work through the examples.

What You Need

  • Mac or PC
  • GitHub account (free)
  • Cloudflare account (free)

Resources

Releases:

  • B1.0 2024/05/15

Contents & Extracts

Note: Contents and extracts of beta books will change as the book is developed.

  • Introduction
    • What is Serverless?
    • Pay For What You Use
    • Scalability
    • High Availability
    • No Server Maintenance
    • Ready to Go Serverless?
  • Deploy Your First Serverless Function excerpt
    • Create A New Worker
    • Configure A Worker
    • Implement Logic In Your Workers
    • Run Scheduled Tasks
    • Deploy Your First Worker
    • What You’ve Learned
  • Build A Serverless API
    • Route HTTP Requests
    • Locally Test Workers
    • Define HTTP Handlers
    • Create Resources Using HTTP POST
    • Define Routes With Parameters
    • What You’ve Learned
  • Run Tests Against A Worker
    • Define The Test Setup
    • Write A Test For 404s
    • Write Tests For GET /images
    • Test POST /images
    • What You’ve Learned
  • Add Persistence To The API
    • Create A D1 Database
    • Connect A Database To A Worker
    • Create A Migration
    • Create Tables
    • Run A Migration
    • Retrieve Multiple Rows
    • Retrieve A Single Row
    • Insert Data
    • What You’ve Learned
  • Worker To Worker Communication. excerpt
    • Create The Authentication Worker
    • Make A Worker Private
    • Add Authentication Logic
    • Store Application Secrets
    • Test The Authentication Worker
    • Add A Service Binding
    • Test A Service Binding
    • What You’ve Learned
  • Build A Static Website
    • Create A Pages Project
    • Understand The Project Structure
    • Install Bootstrap
    • Create The Home Page
    • Run The Static Website Locally
    • Deploy A Pages Application
    • What You’ve Learned
  • Add A Backend To The Frontend
    • Create A Pages Function
    • Create A Serverless Next.js Route
    • Test The Server-Side Endpoint
    • Call The Server-Side Route From The Frontend
    • Run The Weather App Locally
    • Deploy A Pages Application
    • What You’ve Learned
  • Add Caching
    • Create A New KV Namespace
    • Bind KV Namespaces
    • Cache Data In KV
    • Test The Caching Locally
    • Deploy To Cloudflare
    • What You’ve Learned
  • Uploading & Storing Files On Cloudflare
    • Create A New Project
    • Create An R2 Bucket
    • Bind An R2 Bucket
    • Upload Files To R2
    • Create The Frontend
    • Test R2 Uploads Locally
    • Deploy To Cloudflare
    • What You’ve Learned
  • Analyze Images Using AI
    • Add An AI Binding
    • Execute AI Models
    • Render Image Classification Results
    • Test Applications That Use AI
    • What You’ve Learned
  • Producing Messages To A Queue
    • Add A Queue
    • Publish To A Queue
    • View Messages On The Dashboard
    • What You’ve Learned
  • Consuming Messages From A Queue
    • Poll For Analysis
    • Test The Consumer
    • What You’ve Learned
  • Durable Objects
  • Automated Deployments
  • Deploy To Production
    • Register & Transfer Domains
    • Add A Custom Domain To A Project
    • Manage Different Environments
    • Push Logs To Observability Platforms
    • Define Advanced Routes For Workers
    • Deploy Changes Gradually
    • Configure Access To Your Applications
    • Handling Emails
    • Analytics, Security & Speed
    • What You’ve Learned

Author

Ashley Peacock is the author of the bestselling Creating Software with Modern Diagramming Techniques. He has experience across the tech stack, and as a staff engineer and architect working in the UK tech industry for over a decade, he has built a number of serverless applications on Cloudflare. He couldn’t believe how impressive and effortless the process was, which led him to share that expertise in this book.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $31.95 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal

This book is in Beta, final version expected Nov 2024

Beta Books: What do I get?

Related Titles:

About This Title

Pages: 275
Published: November 2024
ISBN: 9798888650714
Edition: 1
In Beta