[DEV] update prod mode

This commit is contained in:
Edouard DUPIN 2020-01-05 18:34:15 +01:00
parent 16b2f6dfd3
commit efeca1c430
3 changed files with 33 additions and 7 deletions

View File

@ -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 ###

View File

@ -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<options.length; iii++) {
if (first ==false) {
out += "&";
} else {
out += "?";
first = false;
}
out += options[iii];
}
return out;
}

View File

@ -6,10 +6,7 @@
export const environment = {
production: false,
// URL of development API
//apiUrl: 'http://localhost:9000/nc1'
//apiUrl: 'http://localhost:9000/backPHP',
apiUrl: 'http://localhost:15080',
//apiUrl: 'http://localhost:4201'
//apiMode: "QUERRY"
apiMode: "REWRITE"
}