Supabase Edge Functions now support running background tasks outside of the request handler. This for example allows us to return a streaming response immediately while in the background uploading the stream to Supabase Storage.
Find the docs: https://supabase.link/background-task...
Find the code: https://supabase.link/background-task...
CHAPTERS:
00:00 Intro
00:15 Background Tasks
00:26 Code Walkthrough
00:30 Create an OpenAI Speech stream
01:20 Implement a Background Task Event
02:20 Create a global Event Listener
02:58 Implement the request handler
03:26 Branch the stream with Readablestream.tee
03:58 Upload to Supabase Storage in the background
💻 Videos to watch next:
▶ • Capture and upload videos with JavaScript
▶ • Getting started with the Google Gemini API...
▶ • Resumable Uploads on Mobile
👇 Learn more about Supabase 👇
🕸 Website: https://supabase.com/
🏁 Get started: https://app.supabase.com/
📄 Docs: https://supabase.com/docs
🔔 Subscribe for more tutorials and feature updates from Supabase: / @supabase
📱 Connect with Us:
🐙 Github: https://www.github.com/supabase
💬 Discord: https://discord.supabase.com/
🐦 Twitter: / supabase
▶ Instagram (follow for memes): / supabasecom
ABOUT SUPABASE:
Supabase is the open source Firebase alternative. Supabase provides a full Postgres database for every project with pgvector, backups, realtime, and more. Add and manage email and password, passwordless, OAuth, and mobile logins to your project through a suite of identity providers and APIs.
Build in a weekend, scale to millions.
#Supabase #AppDevelopment #RealtimeApps #DeveloperTools