-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Filip Procházka
committed
Feb 2, 2017
1 parent
9cef40e
commit ed74b16
Showing
2 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
runtime: go | ||
version: 1 | ||
api_version: go1 | ||
threadsafe: true | ||
|
||
skip_files: | ||
- ^node_modules$ | ||
- ^\.idea$ | ||
|
||
handlers: | ||
- url: /service-worker.js | ||
|
||
static_files: public/service-worker.js | ||
upload: public/service-worker.js | ||
secure: always | ||
|
||
- url: /.* | ||
script: _go_app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
self.addEventListener('install', function (event) { | ||
event.waitUntil(self.skipWaiting()) | ||
}); | ||
|
||
self.addEventListener('activate', function (event) { | ||
// `claim()` sets this worker as the active worker for all clients that | ||
// match the workers scope and triggers an `oncontrollerchange` event for | ||
// the clients. | ||
return self.clients.claim(); | ||
}); |