Skip to content

Commit

Permalink
fix: login
Browse files Browse the repository at this point in the history
  • Loading branch information
rharkor committed Jul 23, 2023
1 parent f5e700c commit 2a6eff5
Show file tree
Hide file tree
Showing 20 changed files with 179 additions and 565 deletions.
4 changes: 3 additions & 1 deletion .env → .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ JWT_SECRET=secret
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=secret
GITHUB_CLIENT_ID=secret
GITHUB_CLIENT_SECRET=secret
GITHUB_CLIENT_SECRET=secret
AUTH_ADMIN_EMAIL=secret
AUTH_ADMIN_PASSWORD=secret
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,27 +75,33 @@ To get started with this boilerplate, follow these steps:
git clone https://github.com/rharkor/next-boilerplate
```

2. Initialize the project:
2. Create a `.env.local` file and add the following environment variables:

```bash
cp .env.example .env.local
```

3. Initialize the project:

```bash
npm run init
```

3. Install the dependencies:
4. Install the dependencies:

```bash
npm ci
```

4. Run the development server:
5. Run the development server:

```bash
npm dev
```

5. Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
6. Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

6. This project uses a git hook to enforce [conventional commits](https://github.com/qoomon/git-conventional-commits). To install the git hook, run the following command in the root directory of the project:
7. This project uses a git hook to enforce [conventional commits](https://github.com/qoomon/git-conventional-commits). To install the git hook, run the following command in the root directory of the project:

```sh
brew install pre-commit
Expand Down
8 changes: 8 additions & 0 deletions env.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export const env = createEnv({
NEXTAUTH_URL: z.string().nonempty(),
GITHUB_CLIENT_ID: z.string().nonempty(),
GITHUB_CLIENT_SECRET: z.string().nonempty(),
AUTH_ADMIN_EMAIL: z.string().nonempty(),
AUTH_ADMIN_PASSWORD: z.string().nonempty(),
},
client: {},
runtimeEnv: {
Expand All @@ -25,5 +27,11 @@ export const env = createEnv({
NEXTAUTH_URL: process.env.NEXTAUTH_URL,
GITHUB_CLIENT_ID: process.env.GITHUB_CLIENT_ID,
GITHUB_CLIENT_SECRET: process.env.GITHUB_CLIENT_SECRET,
AUTH_ADMIN_EMAIL: process.env.AUTH_ADMIN_EMAIL,
AUTH_ADMIN_PASSWORD: process.env.AUTH_ADMIN_PASSWORD,
},
onValidationError: (error) => {
console.error(error)
throw error
},
})
Loading

0 comments on commit 2a6eff5

Please sign in to comment.