Deploying an Angular Application on SAP Neo
My primary experience has been using the SAP Neo environment in the SAP Cloud Platform.
While working with the angular, I faced a lot of problems in deploying the angular app,
And this blog is aimed at reducing the efforts and time spent on deploying the angular app on Cloud platform.
Angular cli is like a command line interface which is used to build the applications similar to NodeJS i.e., breaking them into modules.
Since, everything is moving towards cloud-native development, we will see how to deploy Angular app on SAP Neo environment.
The blog is broken into 3 parts:
Create an application,
build it and
publish it as SaaS.
So, let’s begin …...
- Create an angular cli app with “ng new app_name” command.
- If you are new to angular you can refer https://angular.io/guide/quickstart
3. To run the app, write a command “ng serve -o”.
For a simple deployment, we create a production build and image the result directory to a web server.
4. Now go to the folder where you have created the application dist -> app_name
5. Select all and convert it into a zip file.
- To deploy the app, we must have a SAP Cloud Platform account (trial).(In case you do not have a trial account https://account.hanatrial.ondemand.com/#/home/welcome)
- Open SAP Web IDE in your neo-account.
- Click on services (Left side menu).
- Type SAP Web IDE in search box and select.
- Click on go to services.
Import the zip file you created.
create a file file “neo-app.json in your web ide” It is an application descriptor file, in case you are using HANA services for backend API calls you can register your destination here.
- Once your neo-app file is ready right click on the project file select,
- deploy -> deploy to SAP cloud platform.
Now you will get a link where the app is deployed, and you see the application runs absolutely fine.
This is a nice blog to start with. I have a created a simple helloworld angular app and tried the steps to deploy in hana cloud, but after deploying it is not displaying the content in index.html. in console i am getting the 404 error for runtime.js, main.js and other files in the build folder.
Please let me know how to fix it. Do we have to mention any base href in index.html ?
Thanks and Regards,
could you share your neo-app.json file.
We are currently working with Angular 6 on the SAP Cloud Platform in the NEO environment. Is there any restriction in upgrading the Angular version to 7 or 8?
(Sorry for being really late)
There are few changes from Angular 6 but there aren't any major restrictions.
Hi , Can anyone elaborate steps deploy angular universal application in SAP