https://github.com/vdustr/my-vercel-redirect
My redirect repository for vercel subdomains
https://github.com/vdustr/my-vercel-redirect
domain nodejs redirect subdomain typescript vercel
Last synced: 2 months ago
JSON representation
My redirect repository for vercel subdomains
- Host: GitHub
- URL: https://github.com/vdustr/my-vercel-redirect
- Owner: VdustR
- License: mit
- Created: 2023-06-18T09:12:28.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-31T04:58:20.000Z (6 months ago)
- Last Synced: 2025-05-08T01:43:10.217Z (2 months ago)
- Topics: domain, nodejs, redirect, subdomain, typescript, vercel
- Language: TypeScript
- Homepage: https://vercel.com/docs/concepts/edge-network/redirects
- Size: 262 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# My Vercel App for Subdomain Redirects
This is a Vercel application that enables subdomain redirection to other domains using Edge Middleware.
## Usage
1. Fork this repository and update the `myDomain` and `subdomainMap` variables in `middleware.ts`.
2. Deploy your forked repository to Vercel and configure the domains listed in the `subdomainMap` variable.
3. Set up the domain in your Vercel project:
## Local Testing
- Run `pnpm i` to install dependencies.
- Run `pnpm vercel:dev` to start the local development server.
- Open your browser and visit `http://gh.dev.localhost:3000`.
- Run `pnpm build -w` in another terminal to watch for changes.## Reference
- [Redirects](https://vercel.com/docs/concepts/edge-network/redirects)
- [Edge Middleware](https://vercel.com/docs/concepts/functions/edge-middleware)## License
The code is licensed under the [MIT License](./LICENSE), and the documentation is licensed under the [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/) license.