From bb4fd74ce339956ac0c32b815578ed094ff5daf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez?= Date: Mon, 2 Jan 2023 21:32:55 +0100 Subject: [PATCH] docs: run PWA on dev server (#710) --- CONTRIBUTING.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 305ea7d0..fd5c94c8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,6 +27,21 @@ git checkout -b my-new-branch 7. Run `pnpm dev` in Elk's root folder to start dev server or `pnpm dev:mocked` to start dev server with `@elkdev@universeodon.com` user. +### Running PWA on dev server + +In order to run Elk with PWA enabled, run `pnpm run dev:pwa` in Elk's root folder to start dev server or `pnpm dev:pwa:mocked` to start dev server with `@elkdev@universeodon.com` user. + +You should test the Elk PWA application on private browsing mode on any Chromium based browser: will not work on Firefox and Safari. + +If not using private browsing mode, you will need to uninstall the PWA application from your browser once you finish testing: +- Open `Dev Tools` (`Option + ⌘ + J` on MacOS, `Shift + CTRL + J` on Windows/Linux) +- Go to `Application > Storage`, you should check following checkboxes: + - Application: [x] Unregister service worker + - Storage: [x] IndexedDB and [x] Local and session storage + - Cache: [x] Cache storage and [x] Application cache +- Click on `Clear site data` button +- Go to `Application > Service Workers` and check the current `service worker` is missing or has the state `deleted` or `redundant + ## CI errors Sometimes when you push your changes, the CI can fail, but we cannot check the logs to see what went wrong, run the following commands on your local environment: