Firebase Cloud Functions Boilerplate
By Sage · Published · Updated
Generate the starting code for a Firebase Cloud Function (HTTP or Trigger).
Tags: firebase, coding, cloud
Prompt template
## Introduction Quickly scaffold a Firebase Cloud Function in Node.js. ## Function Details - Function Name: [text: E.g., sendWelcomeEmail] - Trigger Type: [dropdown: HTTPS Callable, HTTP Request (REST), Firestore Trigger (onCreate/Update), Auth Trigger, Pub/Sub Scheduled] - Language: [dropdown: JavaScript, TypeScript] ## Implementation - Describe the function's logic: [textarea: E.g., When a user is created, send them an email via SendGrid] - Firebase SDK version: [dropdown: v2 (Modular), v1 (Legacy)] - Include error handling (try/catch)? [toggle: Yes, No] --- **Goal**: Output the ready-to-deploy Cloud Function code with comments.