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

LOCAL_HTTPS support (with HMR) through ngrok and JS_URL #1290

Merged
merged 1 commit into from
Jul 28, 2020

Conversation

mariusandra
Copy link
Collaborator

Changes

When this is merged, to start a local HTTPS setup run the following commands.

I'll make a PR for the docs once it's merged. Could this replace the existing and more complicated local HTTPS instructions?

The steps:

1. Start ngrok tunnel to 8234 (webpack dev server)

ngrok http 8234

2020-07-28 16 41 54

2. Copy the URL and start webpack

export WEBPACK_HOT_RELOAD_HOST=0.0.0.0
export LOCAL_HTTPS=1
export JS_URL=https://68f83839843a.ngrok.io
yarn start

3. Copy the URL and start the server

export DEBUG=1
export LOCAL_HTTPS=1
export JS_URL=https://68f83839843a.ngrok.io
python manage.py runserver

4. Start a ngrok tunnel to 8000

ngrok http 8000

Do what you need with the URL that is returned to you in the browser!

image

5. Tips & Tricks

If testing the toolbar, make sure to add whatever ngrok urls to the list in /setup.

Also, watch out, network requests can be slow through ngrok:

2020-07-28 16 36 36

Checklist

  • All querysets/queries filter by Team (if applicable)
  • Backend tests (if applicable)
  • Cypress E2E tests (if applicable)

@timgl timgl temporarily deployed to posthog-local-https-ngr-pk1nhx July 28, 2020 14:46 Inactive
@timgl
Copy link
Collaborator

timgl commented Jul 28, 2020

Nice, let's make sure we update the docs too

@timgl timgl merged commit 9265ba2 into master Jul 28, 2020
@timgl timgl deleted the local-https-ngrok branch July 28, 2020 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants