From 92d4f7d5818bc99c194389f21728f8f62b1aa4e6 Mon Sep 17 00:00:00 2001 From: manorlh <44364426+manorlh@users.noreply.github.com> Date: Mon, 25 Feb 2019 09:53:57 +0200 Subject: [PATCH] fix(avoid ui): avoid ui audit (#70) * fix(avoid ui): avoid ui audit avoid ui audit * refactor(lint): lint * chore(pipeline): move timezone to unit-tests stage --- .circleci/config.yml | 6 +++--- src/app.js | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 012df4ddb..f333861ad 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,7 +16,9 @@ jobs: - node_modules unit-tests: docker: - - image: circleci/node:8 + - image: circleci/node:8 + environment: + TZ: "Asia/Jerusalem" steps: - checkout - setup_remote_docker: @@ -31,8 +33,6 @@ jobs: integration-tests: docker: - image: circleci/node:8 - environment: - TZ: "Asia/Jerusalem" - image: circleci/cassandra:3.10 environment: MAX_HEAP_SIZE: 2048m diff --git a/src/app.js b/src/app.js index b6eeee45b..1d5a2df31 100644 --- a/src/app.js +++ b/src/app.js @@ -31,6 +31,11 @@ module.exports = () => { res.header('Access-Control-Allow-Methods', '*'); next(); }); + // all root request are suppose to be the ui , so we put the route before the audit to avoid audit. + app.use(express.static('./ui/dist')); + app.use('/predator', function (req, res, next) { + res.sendFile(path.resolve('ui/dist/index.html')); + }); app.use(bodyParser.json());