2023-04-19 08:46:20 +00:00
|
|
|
import * as YAML from "https://deno.land/std@0.184.0/yaml/mod.ts";
|
2023-08-11 18:37:13 +00:00
|
|
|
import { EndpointRequest, EndpointResponse } from "./hooks/endpoint.ts";
|
2022-10-10 12:50:21 +00:00
|
|
|
|
2024-01-14 12:38:39 +00:00
|
|
|
export async function hello() {
|
|
|
|
const numbers = await syscall("addNumbers", 1, 2);
|
|
|
|
return {
|
|
|
|
yamlMessage: YAML.stringify({ hello: "world" }),
|
|
|
|
addedNumbers: numbers,
|
|
|
|
};
|
2022-10-10 12:50:21 +00:00
|
|
|
}
|
2023-08-11 18:37:13 +00:00
|
|
|
|
|
|
|
export function endpoint(req: EndpointRequest): EndpointResponse {
|
|
|
|
console.log("Req", req);
|
|
|
|
return {
|
|
|
|
status: 200,
|
|
|
|
body: [1, 2, 3],
|
|
|
|
headers: { "Content-type": "application/json" },
|
|
|
|
};
|
|
|
|
}
|