[ACA-3342] Rename API_HOST to API_CONTENT_HOST (#1475)

* Rename API_HOST to API_CONTENT_HOST

* Use the right property called API_CONTENT_HOST

* Replace missing keys
This commit is contained in:
Maurizio Vitale 2020-05-22 09:17:55 +01:00 committed by GitHub
parent 5a12345865
commit e9f33c554d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 10 deletions

View File

@ -32,7 +32,7 @@ The application runs at port `4200` by default, and should automatically open in
You might need to set some environment variables to be able to run the local dev server. In the project's root folder, create a `.env` file (this is gitignored) with the following data: You might need to set some environment variables to be able to run the local dev server. In the project's root folder, create a `.env` file (this is gitignored) with the following data:
```bash ```bash
API_HOST_CONTENT="http://your-url-here" API_CONTENT_HOST="http://your-url-here"
``` ```
## Proxy settings ## Proxy settings

View File

@ -15,7 +15,8 @@ const BROWSER_RUN = process.env.BROWSER_RUN;
const width = 1366; const width = 1366;
const height = 768; const height = 768;
const API_HOST = process.env.API_HOST || 'http://localhost:8080'; const API_CONTENT_HOST =
process.env.API_CONTENT_HOST || 'http://localhost:8080';
function rmDir(dirPath) { function rmDir(dirPath) {
try { try {
@ -33,7 +34,7 @@ function rmDir(dirPath) {
} }
const appConfig = { const appConfig = {
hostEcm: API_HOST, hostEcm: API_CONTENT_HOST,
providers: 'ECM', providers: 'ECM',
authType: 'BASIC' authType: 'BASIC'
}; };

View File

@ -4,16 +4,16 @@ const program = require('commander');
require('dotenv').config({ path: process.env.ENV_FILE }); require('dotenv').config({ path: process.env.ENV_FILE });
const fs = require('fs'); const fs = require('fs');
const API_HOST = process.env.API_HOST || 'api'; const API_CONTENT_HOST = process.env.API_CONTENT_HOST || 'api';
const OAUTH_HOST = process.env.OAUTH_HOST || 'keycloak'; const OAUTH_HOST = process.env.OAUTH_HOST || 'keycloak';
const options = { const options = {
apiHost: { apiHost: {
flags: '-a, --api-host', flags: '-a, --api-host',
description: "set apiHost's and ecmHost's value with API_HOST", description: "set apiHost's and ecmHost's value with API_CONTENT_HOST",
set: appConfig => { set: appConfig => {
appConfig.ecmHost = API_HOST; appConfig.ecmHost = API_CONTENT_HOST;
appConfig.aosHost = API_HOST + '/alfresco/aos'; appConfig.aosHost = API_CONTENT_HOST + '/alfresco/aos';
} }
}, },
oauthHost: { oauthHost: {

View File

@ -1,10 +1,10 @@
require('dotenv').config(); require('dotenv').config();
const API_HOST_CONTENT = process.env.API_HOST_CONTENT || 'http://0.0.0.0:8080'; const API_CONTENT_HOST = process.env.API_CONTENT_HOST || 'http://0.0.0.0:8080';
module.exports = { module.exports = {
'/alfresco': { '/alfresco': {
target: API_HOST_CONTENT, target: API_CONTENT_HOST,
secure: false, secure: false,
changeOrigin: true, changeOrigin: true,
// workaround for REPO-2260 // workaround for REPO-2260
@ -16,7 +16,7 @@ module.exports = {
} }
}, },
'/auth': { '/auth': {
target: API_HOST_CONTENT, target: API_CONTENT_HOST,
secure: false, secure: false,
changeOrigin: true changeOrigin: true
} }