How access 'env' in the WebSockets Template

Hey, I've got a Cloudflare Worker that implements WebSocket connection. The implementation is from: https://github.com/cloudflare/websocket-template

I am wondering how can I access the
env
variable that is usually available to us when we use the
async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
...
syntax instead of the one used in the template,
addEventListener('fetch', event => {
    event.respondWith(handleRequest(event.request))
})
Was this page helpful?