My Personal Website + URL Shortner using Next.js, Cloudflare Pages & KVNamespace
- URL Shortener
- Configurable Redirects (using Cloudflare KVNamespace)
- Configurable Default Redirect (app/not-found.tsx)
- Homepage
- https://caios.pages.dev/ (Default Redirect to https:/caiostoduto)
- https://caios.pages.dev/linkedin (Redirect to https://www.linkedin.com/in/caiostoduto/)
- Clone the repository
$ git clone [email protected]:caiostoduto/caios.pages.dev.git
$ cd caios.pages.dev
- Install dependencies
$ pnpm install
$ pnpm wrangler kv:namespace create REDIRECT
- Deploy the worker
$ pnpm run pages:deploy
-
Bind your KV namespace to your Pages Function (Repeat step 4 after enabling 'nodejs_compat')
-
Add your redirect routes to the KVNamespace (suggest using Cloudflare KVNamespace Dashboard)
must include '/' (default) route