Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mklhx/vuejs-service-worker-demo
https://github.com/mklhx/vuejs-service-worker-demo
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/mklhx/vuejs-service-worker-demo
- Owner: MkLHX
- Created: 2021-05-28T08:37:38.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-11-06T12:22:33.000Z (about 1 year ago)
- Last Synced: 2023-11-06T13:35:36.581Z (about 1 year ago)
- Language: Vue
- Size: 1.62 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vue.js PWA Service Worker Demo
# standalone test
vue/cli-plugin-pwa is not development friendly.
so how to test it?- 1 install http-server:
```shell
npm install http-server -g
```
- 2 build the production app:
```shell
npm run build
```
- 3 start http-server:
```
http-server dist
```on each vuejs app build the new service-worker.js is detected on app and refresh button is displayed.
# docker test
- 1 build the production app:
```shell
npm run build
```
- 2 start the container:
```shell
docker-compose up -d
```# if you've go an error on ssl validity cert/key, just run :
```shell
openssl req -x509 -out ssl/localhost.crt -keyout ssl/localhost.key \
-newkey rsa:2048 -nodes -sha256 \
-subj '/CN=localhost' -extensions EXT -config <( \
printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
```