A simple Cloudflare Worker to redirect the domain I previously used for my personal site (joshuadavidthomas.com) to the new, cooler one 😎 (joshthomas.dev).
-
Clone the repo locally.
git clone https://github.com/joshuadavidthomas/cfworker-redirect-joshthomasdev
-
Change into the project directory and install dependencies.
cd cfworker-redirect-joshthomasdev npm install
-
Start the development server.
npm run start
-
Make changes to the code in
src/index.ts
and test them out athttp://localhost:8787
. -
Deploy to Cloudflare Workers when ready. You will be prompted to login to Cloudflare via OAuth if you haven't already.
npm run deploy
cfworker-redirect-joshthomasdev
is licensed under the MIT License. See LICENSE for more information.