Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cloudflare/worker-template-redirect
https://github.com/cloudflare/worker-template-redirect
Last synced: 29 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/cloudflare/worker-template-redirect
- Owner: cloudflare
- Created: 2019-04-30T22:33:04.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-25T22:50:34.000Z (about 1 month ago)
- Last Synced: 2024-10-03T21:41:21.022Z (about 1 month ago)
- Language: JavaScript
- Size: 115 KB
- Stars: 9
- Watchers: 2
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-cloudflare - Redirect - Examples of sending single and bulk redirects from a Worker script. (Workers / Recipes)
- awesome-cloudflare - Redirect - Examples of sending single and bulk redirects from a Worker script. (Workers / Recipes)
README
## Redirects
Examples of sending single and bulk redirects from a Worker script.
[`index.js`](https://github.com/cloudflare/worker-template-redirects/blob/master/redirect.js) is the content of the Workers script.
Live Demos are hosted on `workers-tooling.cf/demos/redirect`:
[Demo Generate](https://workers-tooling.cf/demos/redirect/send) | [Demo Bulk](https://workers-tooling.cf/demos/redirect/bulk1)
#### Wrangler
To generate using [wrangler](https://github.com/cloudflare/wrangler)```
wrangler generate myApp https://github.com/cloudflare/worker-template-redirect
```#### Serverless
To deploy using serverless add a [`serverless.yml`](https://serverless.com/framework/docs/providers/cloudflare/) file.
`