mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
[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:
parent
5a12345865
commit
e9f33c554d
@ -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
|
||||||
|
@ -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'
|
||||||
};
|
};
|
||||||
|
@ -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: {
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user