Hostname Rewrites using Edge Middleware
Description
Learn how to programmatically create unique content pages for your users with a multi-tenant infrastructure using Edge Middleware.
npx boilerapp hostname-rewrites文档
Hostname Rewrites
If you're building a Platforms on Vercel, this example is for you.
In this example, you'll learn how to programmatically create unique content pages for your users with a multi-tenant infrastructure using Edge Middleware. Each user gets assigned a unique subdomain when they create their account, with the (usually paid) option to add a custom domain.
For context, here are some example pages:
- subdomain-1.vercel.sh (subdomain)
- subdomain-2.vercel.sh (subdomain)
- subdomain-3.vercel.sh (subdomain)
- custom-domain-1.com (custom domain, maps to subdomain-1.vercel.sh)
All of these generated sites are powered by ISR (no SSR at all) so they load pretty much instantly + the inter-page transitions are lightning fast.
The example above is generated based on the following mock database:
const mockDB = [
{name: "Site 1\
Prix
Gratuit