diff --git a/templates/documentation.html b/templates/documentation.html index a9d1a55..5e7e779 100644 --- a/templates/documentation.html +++ b/templates/documentation.html @@ -141,6 +141,40 @@ async (req) => { + +
+
+

Supported Runtimes

+

You can write your functions in JavaScript, Deno, or Python. The + runtime is determined by the file extension of your entrypoint.

+ +

JavaScript (Node.js)

+

The JavaScript runtime uses Node.js. You can use modern + JavaScript features, including `async/await`. NPM packages are not supported.

+
// Example: A simple JavaScript function
+async (req) => {
+    return JsonResponse({ message: "Hello from JavaScript!" });
+}
+ +

Deno

+

The Deno runtime offers a modern, secure, and TypeScript-first + environment. You can import modules directly from URLs.

+
// Example: A simple Deno function
+import { serve } from "https://deno.land/std@0.140.0/http/server.ts";
+
+async (req) => {
+    return JsonResponse({ message: "Hello from Deno!" });
+}
+ +

Python

+

The Python runtime uses Python 3. You can use the standard + library, but third-party packages are not supported.

+
# Example: A simple Python function
+async def main(req):
+    return JsonResponse({"message": "Hello from Python!"})
+
+
+