5.1 KiB
| tags | ||||
|---|---|---|---|---|
|
SupaBase Edge Functions
Perplexity, 13 juni 2025
Prompt: `I’m planning to build a web service using WeWeb to develop the front end, with SupaBase for the back end. SupaBase offers Edge Functions which are developed using Deno. Tell me more about Deno within the context of my web service
If you use Supabase Edge Functions in your web service, you’ll be working with Deno as the runtime for your server-side logic. Here’s what that means for your project:
- Deno is a secure, modern JavaScript/TypeScript runtime: Deno runs your code with secure defaults, requiring explicit permissions for things like file and network access, which reduces security risks12.
- Edge Functions are written in TypeScript or JavaScript: You can use modern language features, and Deno supports TypeScript out of the box—no extra setup needed34.
- Serverless and globally distributed: Supabase Edge Functions run close to your users, reducing latency and improving performance for API endpoints, webhooks, and custom backend logic35.
- Simple dependency management: Deno uses URL-based imports, so you don’t need a package manager or node_modules directory. Modules are imported directly from URLs and cached locally4.
- Direct database access: You can connect to your Supabase Postgres database from within Deno Edge Functions using libraries like
deno-postgres5. - Scalable and auto-deployed: Edge Functions are deployed instantly and auto-scale with demand, making them suitable for both small and large workloads3.
In summary, Deno in the context of your Supabase backend lets you write secure, modern, and scalable server-side code that integrates tightly with your database and runs close to your users for better performance354.
So is Deno like a compiler?
Deno is not a compiler in the traditional sense. It is primarily a JavaScript and TypeScript runtime—meaning it executes your code, similar to how Node.js or a web browser runs JavaScript67. However, Deno does offer a deno compile command, which can package your script and its dependencies into a self-contained executable binary. This allows you to distribute your application as a standalone program that does not require Deno to be installed on the target machine89.
In summary:
- Deno is a runtime for running JavaScript/TypeScript code.
- Deno can also act as a compiler when you use
deno compileto produce standalone executables89.
-
https://app.studyraid.com/en/read/8395/231617/creating-edge-functions-in-supabase ↩︎
-
https://www.codingandbeyond.com/2025/04/13/deno-just-another-javascript-runtime-for-backend/ ↩︎
-
https://www.restack.io/docs/supabase-knowledge-supabase-deno-integration ↩︎
-
https://www.ionos.com/digitalguide/websites/web-development/deno/ ↩︎