Note
This repository is pinned to specific versions and is intentionally not updated. It serves as a reference for deploying this particular stack on Clever Cloud. For a more recent example, check the examples catalog.
This project was generated with Angular CLI version 14.2.3 by following this introductory tutorial for Clever Cloud.
Run ng serve for a dev server. Navigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.
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.
Build is already done in this project. If you change anything, run ng build to build the project. The build artifacts will be stored in the dist/ directory.
💡 ng build clears previous build, while ng serve doesn't.
Run ng test to execute the unit tests via Karma.
Run ng e2e to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
Angular projects can be deployed on static hosting. You don't need a server-side engine to dynamically compose pages because Angular does that on the client-side.
This project routing has already been configured for remote deployment. Follow the procedure on the Clever Cloud Console
- Clone this project
- Create a new application on Clever Cloud
- Choose Git deployment
- Select a Static app
- Inject the following environment variable:
CC_WEBROOT="dist/angular-tour-of-heroes" - You don't need any add-on
- Copy the remote provided by the Console
- Push your code:
git push clever master
💡 If you get a reference error when pushing, try this: git push clever main:master.
Now you can see the logs as your apps deploys! To see it once it's deployed, click on ∞ at the top right of your application page.
Deployments on Clever Cloud are immutable. Whenever the monitoring will make it restart or scale, last commit will be redeployed. To make changes persistent in this app, you would need to connect it to a database, for example.
🎓 Check our doc on Static applications
To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.