Change settings for local development
MODIFY
angular.json
angular.json
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
- "host": "localhost",
- "port": 4200,
+ "host": "0.0.0.0",
+ "port": 80,
"browserTarget": "api-mgmt-dev-portal:build"
},
"configurations": {

MODIFY
docker/start-nginx-with-devportal.sh
docker/start-nginx-with-devportal.sh
@@ -13,8 +13,8 @@ done
if [ -n "$SYSTEM_PREFIX" ]
then
# If a prefix is set we will replace the base path in index.html before starting the application
- # Replace "/" with e.g. "/pas/devportal/"
- sed -i "s/\"\/\"/\"\/$SYSTEM_PREFIX\/devportal\/\"/g" "/usr/share/nginx/html/index.html"
+ # Replace base tag with base tag containing system prefix src e.g. "/pas/devportal/"
+ sed -i "s/<base.*>/<base src=\"$SYSTEM_PREFIX\/devportal\/\">/g" "/usr/share/nginx/html/index.html"
fi
# start nginx
nginx -g 'daemon off;'

MODIFY
package.json
package.json
"version": "7.7.0",
"scripts": {
"ng": "ng",
- "start": "ng serve",
+ "start": "ng serve --disable-host-check",
"build": "ng build",
"build-production": "ng build --prod",
"test": "ng test --reporters junit --watch=false",

MODIFY
src/index.html
src/index.html
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Developer Portal</title>
- <base href="/">
+ <base href="/pas/devportal/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">

Change settings for local development