Skip to content

Commit

Permalink
configuration documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
paolini committed Jun 24, 2024
1 parent 0c3ecc0 commit 03c168a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Configuration

Configuration is done through environment variables. You can create a `.env` file in the root directory. See the file `app.config.ts` for the list of available environment variables.

## Getting Started

First, run the development server:
Expand Down
7 changes: 7 additions & 0 deletions app/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ const config = singleton || (() => {
GOOGLE_AUTH_CLIENT_SECRET: process.env.GOOGLE_AUTH_CLIENT_SECRET || '',
DATABASE_NAME,
DATABASE_URI: process.env.DATABASE_URI || ('mongodb://localhost:27017/' + DATABASE_NAME),
// the following variables are used by next-auth.
// they are included here only for reference
// since they are extracted directly from
// the environment.
// Changing them here will have no effect.
NEXTAUTH_SECRET: process.env.NEXTAUTH_SECRET,
NEXTAUTH_URL: process.env.NEXTAUTH_URL,
}

console.log(` ______ _______ _______ _______ _______ _______ _______ _______
Expand Down

0 comments on commit 03c168a

Please sign in to comment.