Is it possible to put a durable object

Is it possible to put a durable object in a separate file, other than index.ts? I already tried setting script_name but no luck so far.
2 Replies
Salzian
SalzianOP•3y ago
So far I found out that script_name is for a different purpose. Here's the magic line: export {MyDurableObject} from "./myDurableObject"; I'm a bit rusty with JS/TS 😅
Elliot Hesp
Elliot Hesp•3y ago
You need to make sure it's exported from the "entry file" like above vs just being imported from the worker
Want results from more Discord servers?
Add your server