This is the starter template for the Next.js App Router Course. It contains the starting code for the dashboard application.
For more information, see the course curriculum on the Next.js Website.
-
The
AUTH_SECRETenvironment variable should beNEXTAUTH_SECRET.
Generate it withopenssl rand -base64 32, and add it onvercel.cominProject Settings > Environment Variables. Afterwards, redeploy the project to activate it.
For development, add it in the.envfile:NEXTAUTH_SECRET=LFl+yQ7JSSwnr+CnKr13vVerDhuL5e/Nrr3hq8L4OUE=Make sure
.envis in.gitignore, so it is not uploaded to Github! -
The
AUTH_URLenvironment variable should beNEXTAUTH_URL.
It is not required whenAutomatically expose System Environment Variablesis checked onvercel.cominProject Settings > Environment Variables, which is the default! Neither is it required in development.
- Email: user@nextmail.com
- Password: 123456
- Clone this repo, and cd into it in your terminal:
git clone https://github.com/davidde/dashboard_nextjs.git cd dashboard_nextjs - (If you don't have pnpm installed, you can install it globally by running:)
This same command is used to update pnpm.
npm install -g pnpm
(pnpm itself will tell you to update withpnpm add -g pnpm, but this will not work when pnpm is installed with npm, so just update with npm.) - Run
pnpm ito install the project's packages:pnpm i - Then run
pnpm devto start the development server:pnpm devpnpm devstarts the Next.js development server on port 3000, so open http://localhost:3000 in the browser.