aboutsummaryrefslogtreecommitdiffstats
path: root/mascara
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-03-29 09:07:38 +0800
committerkumavis <aaron@kumavis.me>2018-03-29 09:07:38 +0800
commitcbfee0ac7e9ac705ba1a8b5bffa2c5ed4511b70d (patch)
treeb94dd3130a0e6fb84413e85ee038252e1ce63eeb /mascara
parentf35356a89a0f2b0eb670394667e9650ab92f03ed (diff)
downloadtangerine-wallet-browser-cbfee0ac7e9ac705ba1a8b5bffa2c5ed4511b70d.tar.gz
tangerine-wallet-browser-cbfee0ac7e9ac705ba1a8b5bffa2c5ed4511b70d.tar.zst
tangerine-wallet-browser-cbfee0ac7e9ac705ba1a8b5bffa2c5ed4511b70d.zip
mascara - server - server bundles before static assets + serve dist/mascara instead of chrome
Diffstat (limited to 'mascara')
-rw-r--r--mascara/server/index.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/mascara/server/index.js b/mascara/server/index.js
index 0f9b047a7..2ad8af242 100644
--- a/mascara/server/index.js
+++ b/mascara/server/index.js
@@ -15,22 +15,21 @@ function createMetamascaraServer () {
const uiBundle = createBundle(path.join(__dirname, '/../src/ui.js'))
const backgroundBuild = createBundle(path.join(__dirname, '/../src/background.js'))
- // serve bundles
+ // setup server
const server = express()
server.use(compression())
- // ui window
- serveBundle(server, '/scripts/ui.js', uiBundle)
- server.use(express.static(path.join(__dirname, '/../ui/'), { setHeaders: (res) => res.set('X-Frame-Options', 'DENY') }))
- server.use(express.static(path.join(__dirname, '/../../dist/chrome')))
- // metamascara
+ // serve bundles
serveBundle(server, '/metamascara.js', metamascaraBundle)
- // proxy
+ serveBundle(server, '/scripts/ui.js', uiBundle)
serveBundle(server, '/scripts/proxy.js', proxyBundle)
- server.use('/', express.static(path.join(__dirname, '/../proxy')))
- // background
serveBundle(server, '/scripts/background.js', backgroundBuild)
+ // serve assets
+ server.use(express.static(path.join(__dirname, '/../ui/'), { setHeaders: (res) => res.set('X-Frame-Options', 'DENY') }))
+ server.use(express.static(path.join(__dirname, '/../../dist/mascara')))
+ server.use(express.static(path.join(__dirname, '/../proxy')))
+
return server
}