UNPKG

serverless

Version:

Serverless Framework - Build web, mobile and IoT applications with serverless architectures using AWS Lambda, Azure Functions, Google CloudFunctions & more

13 lines (11 loc) 292 B
addEventListener('fetch', event => { event.respondWith(handleRequest(event.request)); }); async function handleRequest(request) { try { await wasm_bindgen(WASM); return new Response(wasm_bindgen.hello()); } catch (e) { return new Response(JSON.stringify(e.message)); } }