From efeca1c4305def184e9218a6bb89a8a270a295b0 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Sun, 5 Jan 2020 18:34:15 +0100 Subject: [PATCH] [DEV] update prod mode --- front/Dockerfile | 2 +- front/src/environments/environment.prod.ts | 35 ++++++++++++++++++++-- front/src/environments/environment.ts | 3 -- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/front/Dockerfile b/front/Dockerfile index 71a56c0..18eb59e 100644 --- a/front/Dockerfile +++ b/front/Dockerfile @@ -20,7 +20,7 @@ ENV PATH /application/node_modules/.bin:$PATH RUN npm install # generate build -RUN ng build --output-path=dist +RUN ng build --output-path=dist --configuration=production ############ ### prod ### diff --git a/front/src/environments/environment.prod.ts b/front/src/environments/environment.prod.ts index 3a63ff7..d24410e 100644 --- a/front/src/environments/environment.prod.ts +++ b/front/src/environments/environment.prod.ts @@ -1,5 +1,34 @@ +// The file contents for the current environment will overwrite these during build. +// The build system defaults to the dev environment which uses `environment.ts`, but if you do +// `ng build --env=prod` then `environment.prod.ts` will be used instead. +// The list of which env maps to which file can be found in `.angular-cli.json`. + export const environment = { - production: true, + production: false, // URL of development API - apiUrl: 'https://localhost:3000' -}; + apiUrl: 'http://192.168.1.157/karideo/api/', + //apiMode: "QUERRY" + apiMode: "REWRITE" +} + +export let createRESTCall = function(api, options) { + let basePage = environment.apiUrl; + let addressServerRest = basePage + "/"; + let out; + if (typeof options === 'undefined') { + options = []; + } + out = addressServerRest + api; + let first = true; + for (let iii=0; iii