diff options
author | frankiebee <frankie.diamond@gmail.com> | 2017-03-10 10:24:41 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2017-03-10 10:24:41 +0800 |
commit | 9f3445252c766053b7a773d75dceb1c1bbfdc6f5 (patch) | |
tree | 9722cb40e5799cbda5a356d79ff6737254c50b9f /library/server.js | |
parent | e602cb13c5266516aadeb1c6908575d43afe4164 (diff) | |
download | tangerine-wallet-browser-9f3445252c766053b7a773d75dceb1c1bbfdc6f5.tar tangerine-wallet-browser-9f3445252c766053b7a773d75dceb1c1bbfdc6f5.tar.gz tangerine-wallet-browser-9f3445252c766053b7a773d75dceb1c1bbfdc6f5.tar.bz2 tangerine-wallet-browser-9f3445252c766053b7a773d75dceb1c1bbfdc6f5.tar.lz tangerine-wallet-browser-9f3445252c766053b7a773d75dceb1c1bbfdc6f5.tar.xz tangerine-wallet-browser-9f3445252c766053b7a773d75dceb1c1bbfdc6f5.tar.zst tangerine-wallet-browser-9f3445252c766053b7a773d75dceb1c1bbfdc6f5.zip |
put background in service worker
Diffstat (limited to 'library/server.js')
-rw-r--r-- | library/server.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/library/server.js b/library/server.js index 797ad8a77..b9f59c2a1 100644 --- a/library/server.js +++ b/library/server.js @@ -7,6 +7,7 @@ const zeroBundle = createBundle('./index.js') const controllerBundle = createBundle('./controller.js') const popupBundle = createBundle('./popup.js') const appBundle = createBundle('./example/index.js') +const swBuild = createBundle('./sw-core.js') // // Iframe Server @@ -24,6 +25,11 @@ iframeServer.use('/popup', express.static('../dist/chrome')) iframeServer.get('/controller.js', function(req, res){ res.send(controllerBundle.latest) }) +iframeServer.get('/sw-build.js', function(req, res){ + console.log('/sw-build.js') + res.setHeader('Content-Type', 'application/javascript') + res.send(swBuild.latest) +}) // serve background controller iframeServer.use(express.static('./server')) |