diff --git a/.circleci/config.yml b/.circleci/config.yml
index a93ff43..1c44f82 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -26,8 +26,10 @@ jobs:
                 key: v1-dependencies-{{ checksum "server/package.json" }}
                 key: v1-dependencies-{{ checksum "client/package.json" }}
 
-            # build server (just apidoc)
+            # build server (just apidoc) & reinstall modules (just production)
             - run: cd server; npm run apidoc:public
+            - run: cd server; rm -rf node_modules
+            - run: cd server; npm install --production
             # build client (angular build)
             - run: cd client; npm run build
             - run: cd client; npm run lint
diff --git a/client/src/app/shared/stjorna.service.ts b/client/src/app/shared/stjorna.service.ts
index 497506d..dc8c226 100644
--- a/client/src/app/shared/stjorna.service.ts
+++ b/client/src/app/shared/stjorna.service.ts
@@ -29,7 +29,7 @@ export class StjornaService {
         if (window.location.hostname === 'localhost') {
             this.host = 'http://localhost:3000';
         } else {
-            this.host = '/';
+            this.host = window.location.origin;
         }
     }
 
diff --git a/client/src/main.ts b/client/src/main.ts
index 3dabfe2..aaf1952 100644
--- a/client/src/main.ts
+++ b/client/src/main.ts
@@ -2,12 +2,8 @@ import { enableProdMode } from '@angular/core';
 import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
 import { AppModule } from './app/app.module';
 
-// depending on the env mode, enable prod mode or add debugging modules
-const config = {
-    prod: false
-};
-
-if (config.prod) {
+// if not on localhost url, activate prod mode
+if (window.location.hostname !== 'localhost') {
     enableProdMode();
 }