aboutsummaryrefslogtreecommitdiffstats
path: root/mascara/server
diff options
context:
space:
mode:
authorChi Kei Chan <chikeichan@gmail.com>2018-01-13 05:41:03 +0800
committerGitHub <noreply@github.com>2018-01-13 05:41:03 +0800
commit71a308d98b541b05ffabf8f63085e3cbd8bf61b7 (patch)
tree5f360e4a65a0768817913e99840e3705439432e2 /mascara/server
parent0f4bfcb02e3a04f044a571e01a4977dae2afec8e (diff)
parentbdcee058dc278c46c828f376476f121417481385 (diff)
downloadtangerine-wallet-browser-71a308d98b541b05ffabf8f63085e3cbd8bf61b7.tar
tangerine-wallet-browser-71a308d98b541b05ffabf8f63085e3cbd8bf61b7.tar.gz
tangerine-wallet-browser-71a308d98b541b05ffabf8f63085e3cbd8bf61b7.tar.bz2
tangerine-wallet-browser-71a308d98b541b05ffabf8f63085e3cbd8bf61b7.tar.lz
tangerine-wallet-browser-71a308d98b541b05ffabf8f63085e3cbd8bf61b7.tar.xz
tangerine-wallet-browser-71a308d98b541b05ffabf8f63085e3cbd8bf61b7.tar.zst
tangerine-wallet-browser-71a308d98b541b05ffabf8f63085e3cbd8bf61b7.zip
Merge branch 'uat' into cb-388
Diffstat (limited to 'mascara/server')
-rw-r--r--mascara/server/index.js3
-rw-r--r--mascara/server/util.js4
2 files changed, 6 insertions, 1 deletions
diff --git a/mascara/server/index.js b/mascara/server/index.js
index 83f84f6d1..6fb1287cc 100644
--- a/mascara/server/index.js
+++ b/mascara/server/index.js
@@ -2,6 +2,7 @@ const path = require('path')
const express = require('express')
const createBundle = require('./util').createBundle
const serveBundle = require('./util').serveBundle
+const compression = require('compression')
module.exports = createMetamascaraServer
@@ -16,6 +17,8 @@ function createMetamascaraServer () {
// serve bundles
const server = express()
+ server.use(compression())
+
// ui window
serveBundle(server, '/ui.js', uiBundle)
server.use(express.static(path.join(__dirname, '/../ui/'), { setHeaders: (res) => res.set('X-Frame-Options', 'DENY') }))
diff --git a/mascara/server/util.js b/mascara/server/util.js
index af2daddb9..f9692afb6 100644
--- a/mascara/server/util.js
+++ b/mascara/server/util.js
@@ -23,7 +23,9 @@ function createBundle (entryPoint) {
cache: {},
packageCache: {},
plugin: [watchify],
- }).transform('babelify')
+ })
+ .transform('babelify')
+ .transform('uglifyify', { global: true })
bundler.on('update', bundle)
bundle()