Site Configuration
Learn how to manage site configuration for your application.
We store the site configuration in src/config/site.ts
.
The configuration has the following structure:
Environment Variables
Both Next.js have built-in support for loading environment variables from .env
into process.env
.
Development environment variables:
Copy the .env.example file:
Loading the environment variables into process.env
Authentication keys are stored in the auth
object. The key
property is used to get the session on cookie.
Generate a secret key for your application. This key is used to encrypt cookies, ensuring the security of user sessions. You can do this by running the following command in your terminal: