From f5ecdb4459e796e48ade552c503622f0451a3946 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Thu, 17 Jun 2021 22:59:19 +0100 Subject: [PATCH] Adds an example TOML file, and link to backend source code --- docs/backup-restore.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/backup-restore.md b/docs/backup-restore.md index 11c578e9..2c6b2158 100644 --- a/docs/backup-restore.md +++ b/docs/backup-restore.md @@ -49,6 +49,20 @@ Maximum of 24mb of storage per user. Please do not repeatedly hit the endpoint, - Add your `zone_id` (found in the Overview tab of your desired domain on Cloudflare) - Add your `route`, which should be a domain or host, supporting a wildcard +```toml +name = "dashy-worker" +type = "javascript" + +workers_dev = true +route = "example.com/*" +zone_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +account_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + +kv_namespaces = [ + { binding = "DASHY_CLOUD_BACKUP", id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" } +] +``` + #### Complete `index.js` - Write code to handle your requests, and interact with any other data sources in this file - Generally, this is done within an event listener for 'fetch', and returns a promise @@ -66,7 +80,7 @@ async function handleRequest(request) { } ``` -- For the code used for Dashy's cloud service, see [here](https://notes.aliciasykes.com/p/j2F1deljv1) +- For the code used for Dashy's cloud service, see [here](https://gist.github.com/Lissy93/d19b43d50f30e02fa25f349cf5cb5ed8#file-index-js) #### Commands