Skip to content

Commit

Permalink
update posthog env var name to be available on client
Browse files Browse the repository at this point in the history
fix a few typos in readme
  • Loading branch information
konstrybakov committed Aug 25, 2024
1 parent f966a60 commit bae6cb7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ AUTH_KEYCLOAK_ISSUER="http://localhost:8080/realms/wayway"

# ------------------------------------------------------------
# Posthog
POSTHOG_DISABLED=true
NEXT_PUBLIC_POSTHOG_DISABLED=true
NEXT_PUBLIC_POSTHOG_KEY=
NEXT_PUBLIC_POSTHOG_HOST=
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,20 @@ Before setting up the project, ensure you have the following installed and confi
AUTH_SECRET=<randomly-generated-secret-string>
```

You can use `openssl rand -base64 32` for AUTH_SECRET

5. If you plan to use AI features, add your OpenAI API key:

```
OPENAI_API_KEY=<your-openai-api-key>
```

6. Run database migrations

```
bun db:migrate
```

### Authentication Setup

Choose one of the following authentication methods:
Expand Down Expand Up @@ -91,7 +100,7 @@ Choose one of the following authentication methods:
- Email: `barry@mail.com`
- Password: `barrycakes`

### Option 2: GitHub OAuth
#### Option 2: GitHub OAuth

1. Create a new OAuth app in your GitHub account:

Expand All @@ -103,7 +112,7 @@ Choose one of the following authentication methods:
AUTH_GITHUB_SECRET=<your-github-oauth-app-secret>
```

## Starting the Application
### Starting the Application

Once you've completed the setup, you can start the application in dev mode:
Expand All @@ -113,7 +122,7 @@ bun dev
Visit `http://localhost:3000` in your web browser to access the application.
## Troubleshooting
### Troubleshooting
If you encounter any issues during setup or running the application, please check the following:
Expand Down
2 changes: 1 addition & 1 deletion app/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import posthog from 'posthog-js'
import { PostHogProvider } from 'posthog-js/react'
import type { PropsWithChildren } from 'react'

const posthogDisabled = process.env.POSTHOG_DISABLED === 'true'
const posthogDisabled = process.env.NEXT_PUBLIC_POSTHOG_DISABLED === 'true'

if (!posthogDisabled) {
if (!process.env.NEXT_PUBLIC_POSTHOG_KEY) {
Expand Down

0 comments on commit bae6cb7

Please sign in to comment.