From 315500af36a378df7c9142827074f7a602ea1815 Mon Sep 17 00:00:00 2001 From: Ben Vinegar Date: Thu, 1 Feb 2024 23:01:20 -0500 Subject: [PATCH] Run build before wrangler deploy + add some troubleshooting docs --- README.md | 9 ++++++++- package.json | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9e255246..8053b407 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,14 @@ If you don't have one already, [create a Cloudflare account here](https://dash.c 1. Create a new Analytics Engine dataset, called `metricsDataset` 1. It should now be live. Visit `https://counterscale.{yoursubdomain}.workers.dev`. -NOTE: The deployment URL can always be changed to go behind a custom domain you own. [More here](https://developers.cloudflare.com/workers/configuration/routing/custom-domains/). +### Troubleshooting + +If the website is not immediately available (e.g. "Secure Connection Failed"), it could be because Cloudflare has not yet activated your subdomain (yoursubdomain.workers.dev). This process can take a minute; you can check in on the progress by visiting the newly created worker in your Cloudflare dashboard (Workers & Pages → counterscale). + +### Custom Domains + + +The deployment URL can always be changed to go behind a custom domain you own. [More here](https://developers.cloudflare.com/workers/configuration/routing/custom-domains/). ## Installing the Tracker diff --git a/package.json b/package.json index 2008fb67..e82a7e4d 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "build": "remix build", - "deploy": "wrangler deploy", + "deploy": "npm run build && wrangler deploy", "dev": "remix dev --manual -c \"npm start\"", "lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .", "start": "wrangler dev ./build/index.js", @@ -68,4 +68,4 @@ "engines": { "node": ">=20.0.0" } -} +} \ No newline at end of file