Skip to content

Instantly share code, notes, and snippets.

@peterbe
Last active January 16, 2020 17:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterbe/1cf4861600177b3ad67b4e05170da38d to your computer and use it in GitHub Desktop.
Save peterbe/1cf4861600177b3ad67b4e05170da38d to your computer and use it in GitHub Desktop.
How to debug Interactive Examples in Kuma

Basics

First set this in your kuma .env file:

INTERACTIVE_EXAMPLES_BASE=http://localhost:9090

Now, start kuma (docker-compose up) and navigate to a page that as an Interactive Example. In a separate terminal go into the interactive-examples repo and type:

npm run start

And that should start something on http://localhost:9090. Now viewing MDN pages should put the iframe to http://localhost:9090/... and it should work.

Play with bob

Suppose you want to try a local version of bob in the interactive-examples and not just what's available on npmjs.com. Go into the interactive-examples project and run the following:

npx install-local ~/dev/MOZILLA/MDN/bob && node node_modules/.bin/mdn-bob

And, immediately after than, run:

npm run start-server

Note!

The <iframe src=".... gets set when you render the page. So you might need to re-render those so that it changes to <iframe src="http://localhost:9090/....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment