Skip to content
Snippets Groups Projects
Commit 1c9eb6d5 authored by Eugen Ciur's avatar Eugen Ciur
Browse files

register a hello world service worker

parent 1cc5d900
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Papermerge</title>
<title>Papermerge DMS</title>
<meta name="description" content="Papermerge - document management system for digital archives">
<meta name="viewport" content="width=device-width, initial-scale=1">
......@@ -20,6 +20,11 @@
<script src="{{rootURL}}assets/vendor.js"></script>
<script src="{{rootURL}}assets/papermerge.js"></script>
<script>
navigator.serviceWorker.register('{{rootURL}}assets/service-worker.js')
.then(reg => console.log('Service worker registered', reg))
.catch(err => console.log('There was an error while registering service worker', err));
</script>
{{content-for "body-footer"}}
</body>
......
......@@ -22,6 +22,7 @@ module.exports = function (defaults) {
// modules that you would like to import into your application
// please specify an object with the list of modules as keys
// along with the exports of each module as its value.
app.import('worker.js');
return app.toTree();
};
console.log('hello, I am service worker');
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment