From a12e8a36603b84f7e92748691a96e1bde2ed7713 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Mon, 30 Aug 2021 13:59:34 -0500 Subject: [PATCH] CONTRIBUTING: add section about tools/serve.py --- CONTRIBUTING.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ba202804..7578d12f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -103,6 +103,21 @@ See the section about [deployment][deployment] for more information. [deployment]: https://facebook.github.io/create-react-app/docs/deployment +### `./tools/serve.py` + +WebBluetooth requires https. So to locally test the result of `yarn build`, +run `./tools/serve.py` then point a web browser to +(don't leave out https!). + +Usually using `yarn start` is more convenient for local development, but this is +particularly useful for testing changes on an Android device, for example. On +remote devices, replace `localhost` with the hostname or IP address of the +computer running the `./tools/serve.py` script. + +This server uses a self-signed certificate, so the browser will complain that +the site is not secure. This warning can be ignored by clicking the *Advanced* +button and then click the link to proceed to the site. + ## Learn More You can learn more in the [Create React App documentation][create-react-app-doc].