let me try and answer all your questions in one go haha 1. yes, check the docs for how to import and

let me try and answer all your questions in one go haha
  1. yes, check the docs for how to import and link stuff, should be pretty simple
  2. yes, jsrpc is between multiple workers - although you can bind a worker to itself, and use a different entrypoint, but that usually has other usecases (that require recursion or another 1000 subrequests)
  3. I don't actually think there are many best practices around it yet, it's so new; the way I'd structure it is to have a few entrypoints (with route patterns) that do similar stuff (like one worker for main api, and a few more for any special functions such as webhooks if you have them), and pass them through a few other workers that handle CORS, auth, rate limiting, etc, and then business logic; you should be able to use jsrpc for all these, light and heavy tasks alike
Was this page helpful?