I have one Angular 2 project with some configuration files for access to microservices. This project deploying and building automatically by Jenkins to different servers. That proccess could be showed like this
The question is: How to create custom configuration for each server. Option with
environment.{$server_name}.ts
not good, because in my case count of servers can be huge.
UPDATE:
Configuration file containe microservice url, example:
export const MSConfigAPI = {
protocol: 'http',
baseUrl: 'some-url',
version: 'v1',
port: '8082',
clientId: 'api_user',
clientSecret: 'pass',
getUrl: () => {
return MSConfigAPI.protocol + '://' + MSConfigAPI.baseUrl + ':' + MSConfigAPI.port + '/' + MSConfigAPI.version + '/';
}
};
Also i could have other configuration files that needes only for particular server.
My appication is CMS, so i want to have one source code, but for each project i want to change local configuration files.
On each server placed result of ng build --prod --aot
, so plain css, js and other content.
Thanks for your answers!