tratohecho3 / nextjs-tdd-interview-base

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

multi-brand example

This example shows how to render multiple brands using a _middleware.

Demo

https://nextjs-tdd-interview-base.vercel.app/?brand=chene

https://nextjs-tdd-interview-base.vercel.app/?brand=sapin

You can also edit your /etc/hosts to view the brands based on the domain.

127.0.0.1 www.chene.com
127.0.0.1 www.sapin.com

How to Use

You can choose from one of the following two methods to use this repository:

One-Click Deploy

Deploy the example using Vercel:

[Deploy with Vercel](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/examples/tree/main/edge-functions/multi-brand&project-name=multi-brand&repository-name=multi-brand

Clone and Deploy

Execute create-next-app with npm or Yarn to bootstrap the example:

npx create-next-app --example https://github.com/vercel/examples/tree/main/edge-functions/multi-brand
# or
yarn create next-app --example https://github.com/vercel/examples/tree/main/edge-functions/multi-brand

Next, run Next.js in development mode:

npm install
npm run dev

# or

yarn
yarn dev

Deploy it to the cloud with Vercel (Documentation).

About


Languages

Language:TypeScript 72.1%Language:JavaScript 27.9%