Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update README to include missing steps for running local nextjs playground #1455

Merged
merged 5 commits into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,12 @@ After all this, you'll be able to run through the below steps:
You can use the create react app setup in `playground/nextjs` to test posthog-js as an npm module in a Nextjs application.

1. Run `posthog` locally on port 8000 (`DEBUG=1 TEST=1 ./bin/start`).
2. Run `python manage.py setup_dev --no-data` on posthog repo, which sets up a demo account.
3. Copy posthog token found in `http://localhost:8000/project/settings` and then
4. `cd playground/nextjs`and run `NEXT_PUBLIC_POSTHOG_KEY='<your-local-api-key>' pnpm dev`
1. Run `python manage.py setup_dev --no-data` on posthog repo, which sets up a demo account.
1. Copy Project API key found in `http://localhost:8000/project/settings` and save it for the last step.
1. Run `cd playground/nextjs`.
1. Run `pnpm i` to install dependencies.
1. Run `pnpm run build-posthog-js` to build `posthog-js` locally.
1. Run `NEXT_PUBLIC_POSTHOG_KEY='<your-local-api-key>' NEXT_PUBLIC_POSTHOG_HOST='http://localhost:8000' pnpm dev` to start the application.

### Tiers of testing

Expand Down Expand Up @@ -100,4 +103,4 @@ Only one person is set as a collaborator on NPM, so they're the only person that

Use the "release alpha" label on your PR to have an alpha version published automatically. This automation currently doesn't check whether an alpha exists for the version it will try to publish. If you need to publish two alphas from one PR you'll need to fix that

Remember that these versions are public and folk might use them, so make sure they're not _too_ alpha 🙈
Remember that these versions are public and folk might use them, so make sure they're not _too_ alpha 🙈
Loading