This project was generated with Angular CLI version 1.4.9.
DO NOT RUN the development server, as the config properties must be generated by a PCF buildpack
Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
-
.profile - this tells the static buildpack to run the enclosed script, which grabs environment settings and inserts them into a file called config.json in the document root of the Angular app.
-
package.json - look for the post-build script that copies the .profile into the resulting dist/ directory we deploy to PCF.
-
Service - this one is called "dynamic" - look in src/app/properties - This service queries the
/config.jsonfile that is generated at deploy time. -
manifest.yml (for PCF) - In here we set the buildpack, lower the memory in use, and set some sample environment properties that will be retreived using the
.profilescript.
Upon first download of this repo, run npm install to bring in the required packaged and create the node_modules directory.
Run npm run build to build the project. The build artifacts will be stored in the dist/ directory. Use the -prod flag for a production build.
To deploy, run cf push. The reason this works with teh static buildpack is due to the presence of the manifest file with the static buildpack.
To change a config property, use cf set-env and then restage the application.
Using cf ssh <app> you can then view the new config.json within app/public inside the container.
Run ng test to execute the unit tests via Karma.
Run ng e2e to execute the end-to-end tests via Protractor.