Skip to content

Commit

Permalink
Run build before wrangler deploy + add some troubleshooting docs
Browse files Browse the repository at this point in the history
  • Loading branch information
benvinegar committed Feb 2, 2024
1 parent 7e4e561 commit 315500a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -68,4 +68,4 @@
"engines": {
"node": ">=20.0.0"
}
}
}

0 comments on commit 315500a

Please sign in to comment.