Skip to content

Commit

Permalink
Merge branch 'main' of github.com:UFO-Studios/WorkerDownloadRecorder
Browse files Browse the repository at this point in the history
Niceygy committed Apr 22, 2024

Unverified

No user is associated with the committer email.
2 parents 0c0b97b + 7fdb991 commit d60b71f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -6,13 +6,16 @@
- Run `wrangler deploy`
- Attach a two KVs to this worker, `WDR` & `WVR` for download records & page views respectively.

### Usage(Downloads):
- Change your download links to `https://Your.Worker.workers.dev/reder?url=`GH_Username/Repo?file=RELEASE-NUM/FILENAME.zip<br>
### Usage (Downloads):
- Change your download links to `https://Your.Worker.workers.dev/reder?url=`GH_Username/Repo?file=Release_Number/File_Name.ext<br>
- Change GH_Username, Repo, Release_Number & File_Name.ext <br>
E.G: download.niceygy.worker.dev/reder?url=niceygylive/niceygylive.xyz?file=1.2.1/setup.exe
- It will record the download, then redirect the user to github.com/GH_Username/Repo/releases
- It will record the download, then redirect the user to github.com/GH_Username/Repo/releases/Release_Number/File_Name.ext

### Usage (Page Views):
- Add `<link href="https://Your.Worker.workers.dev?page=/path/to/page" rel="prerender" />` to any of your pages. This will send a single request to the worker on page load, which then records it.
E.G: `https://Your.Worker.workers.dev?page=/downloads/download-recorder`

### Usage(Page Views):
- Add `<link href="https://Your.Worker.workers.dev?page=/path/to/page" rel="prerender" />` to any of your pages.

### Usage (Discord webhook):
- Add a env variable `url` with your discord webhook url.

0 comments on commit d60b71f

Please sign in to comment.