Have an initial script that processes some data and pushes it it to a D1 DB - so I want the context

Have an initial script that processes some data and pushes it it to a D1 DB - so I want the context of a DB etc in the normal way it might be used in a worker, so I can use shared code.
I currently have a /setup route that does some initial config for the worker - but I'd rather it were run as a script and not make it accessible to be called through the worker.
Was this page helpful?