This is a Next.js project bootstrapped with create-next-app
.
Install dependencies
npm install
# or
yarn install
Run the development server:
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
- At the root of the project, creata a file called .env.local
- Add environment variables inside with prefix NEXT_PUBLIC_ at front. Eg. NEXT_PUBLIC_MONGODB_URI="xxxxxx"
- Modify your code so they are consistent with the .env.local file environment variable name.
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.