To use this blog as your own you will need to create 2 seprate .env files, one name .env and the other named .env.local. The reason for this is because Next.js uses .env.local by default but prisma and next-auth use .env by default. You could figure out how to combine them into one but it was just as easy for me to create 2 seperate ones. What you will need in both those files are as follows.
.env
- You will need your database connection url
- You will need your next-auth url, this will be localhost:3000 while in development if using default Next.js settings.
- You will need a next-auth secret, this string will be used to sign your JWT's
- You will need all you ID's and SECRET's for the providers that you will use for next-auth, they have all the details on their site on how to register your app with a Provider
.env.local
- NODE.ENV variable, set to either production or development
- Any sites for pulling in images that use an ID and Secret, ie. Unsplash
Happy Coding! 💻