-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
content:editRequest for content editsRequest for content editsdocumentationDocumentation editsDocumentation editsproduct:durable-objectsDurable Objects: https://developers.cloudflare.com/workers/learning/using-durable-objects/Durable Objects: https://developers.cloudflare.com/workers/learning/using-durable-objects/
Description
Existing documentation URL(s)
https://developers.cloudflare.com/durable-objects/api/storage-api/
What changes are you suggesting?
Creating a new project with the above example, and the following wrangler.toml produces an error upon running locally with miniflare:
▲ [WARNING] workerd/server/server.c++:1833: warning: A ServiceDesignator in the config referenced the entrypoint "Counter", but this class does not extend 'WorkerEntrypoint'. Attempts to call this entrypoint will fail at runtime, but historically this was not a startup-time error. Future versions of workerd may make this a startup-time error.
[[durable_objects.bindings]]
name = "COUNTER"
class_name = "Counter"
[[migrations]]
tag = "v1"
new_classes = [ "Counter" ]
index.tsx:
export { Counter } from './counter';
export default {
async fetch(request: Request, env: any, ctx: ExecutionContext): Promise<Response> {
return new Response('Hello World!');
},
};
Can we get the example updated to meet the requirements of that warning?
Additional information
No response
khattaksd
Metadata
Metadata
Labels
content:editRequest for content editsRequest for content editsdocumentationDocumentation editsDocumentation editsproduct:durable-objectsDurable Objects: https://developers.cloudflare.com/workers/learning/using-durable-objects/Durable Objects: https://developers.cloudflare.com/workers/learning/using-durable-objects/