Ah I was thinking of keeping a Hono router around. To save CPU time for setup.
Ah I was thinking of keeping a Hono router around. To save CPU time for setup.
fetch handler (which Hono handles for you, in that example) is "global"A given isolate has its own scope, but isolates are not necessarily long-lived. An isolate may be spun down and evicted for a number of reasons
Because of this, it is generally advised that you not store mutable state in your global scope unless you have accounted for this contingen

wrangler tail also tells me Exception Thrown but no details other than Error: The script will never generate a response.wrangler secret to manage a different set of secrets ... which takes longer secret values just fine. Competing technologies?"The script will never generate a response" happens when the runtime sees that it has finished executing all the JavaScript microtasks for a particular request, and no I/O operations have been scheduledcan be caused by a library you are using as well, there's a few that could cause it that are known issues, as well as just any that assumes globals are fine/persisting promises, which is ok in most other environments
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.wrangler secret put but they are empty in my app. I have an export interface Env { FOO_SECRET: string; } in my app but the string is empty.wrangler dev), those secrets won't be pulled down, need to define them for local dev in .dev.vars file at the root of your project: https://developers.cloudflare.com/workers/configuration/secrets/#local-development-with-secrets
interface Env in my code that just lists those secrets .. but is that additive to the ones defines in wrangler.jsonc? I don't have any other bindings right now so i am not sure what happens next time in run wrangler types

fetchwrangler tailException ThrownError: The script will never generate a response.wrangler secretFailed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.wrangler secret putexport interface Env { FOO_SECRET: string; }wrangler devinterface Envwrangler typesconst app = new Hono()
export default app;