
/my-endpoint , If I need to use one(or many) API call ( fetch or any sdk ( aws / gcp ..) ) , is it better to trigger a function and wait for the result or I can chain the API call directly from the worker ?

mainenv.ASSETS.fetch right?selflare to dev locally for pages ?Cannot read properties of undefined (reading 'get')functions in my (react) pages project, this folder will be use for the "backend" (receive request) where I can safely import my Secrets (using env). /my-endpointapp.get('/*', (c) => {
return c.env.ASSETS.fetch(c.req.raw);
});selflareCannot read properties of undefined (reading 'get')Secretsname = "correct-worker-name"
main = "worker.js"
compatibility_date = "2023-08-23"
kv_namespaces = [
{ binding = "WORKER_KV", id = "correctid-123" }
]export default {
async fetch(request, env, ctx) {
const value = await env.WORKER_KV.get("thecorrectkey-123");
return new Response(value);
},
};