Custom angular app for custom spartacus storefront - sap-commerce-cloud

Our requirement is to use multiple angular apps, 1 for ootb spartacus storefronts and 1 for custom site. By following this github link we had created new app at below location. and updated manifest.json, to build 2 angular apps in CCV2. but the deployment was failed. Can you please suggest steps to fulfill this requirement.

Related

Deploy multiple spartacus storefronts?

Is it possible to deploy multiple spartacus angular projects on Commerce Cloud?
I have two Spartacus project and want them both accessible to users. However currently they are deployed to the root and the second one overwrites the first.
This SAP support article has the answers: https://help.sap.com/docs/SAP_COMMERCE_CLOUD_PUBLIC_CLOUD/b2f400d4c0414461a4bb7e115dccd779/1c26045800fa4f85a9d49e5a614e5c22.html?version=v2105
You just need to make sure that you match the manifest.json app name with the output in angular.json outputPath, then you can set the routing in CCV2 by setting properties as followed:
Configure all endpoints to point to the JS Storefront service.
www.brand1.com → Javascript Storefront
www.brand2.com → Javascript Storefront
Configure endpoint-to-storefront mapping in JavaScript storefront service properties.
In the Cloud Portal, choose your environment, then select Service Configuration View configurations JavaScript storefront.
Add your properties in the following format: jsapps..severname.=.
For example:
jsapps.app1.servername.1=www.brand1.de
jsapps.app2.servername.0=www.brand2.com

How do I setup web pages within Azure Service Fabric Stateless Web API?

I am using VS 2017 and have successfully setup to use Stateless Web API. I can see the output of the default controller when I run it.
Now, I want to create web pages within this project and use AngularJS SPA within it to access its own API.
I am unable to find any examples which clearly show how to do this. Note this is ASP.NET Web API - not ASP.NET Core.
Someone please help.
I opened a support ticket with Microsoft and this can be done with the ASP.NET Web API support in service fabric. Web pages can be added to the self-hosted web api project, but each file has to be individually configured for this project - if you have hundreds of files, it does not allow you to configure the entire folder contents for the project, because you have to mark each file to build as content. The example they sent me is an obscure article in a Microsoft blog from a Microsoft Engineer nobody has heard of before.
Not worth it. Use the ASP.NET Core support.

Azure endpointName.azureedge.net error

Azure endpointName.azureedge.net created successfully but while accessing Endpoint url it show error
You do not have permission to view this directory or page.
Did I need to add Custom domain to work it out.
Please guide me.
Which endpoint do you add in Azure CDN profile? If adding Azure web app as its endpoint, which language do you use to develop your web app? From my experience, Please try to input detailed path in your url, for example https://endpointName.azureedge.net/default. We can also set default page at Azure web app Application settings like below screenshot:
Build your solution in release mode
Try to publish it with using publish option of project then check

How do add a custom http module to a running Azure Webapp programmatically?

I have a custom http module (.DLL developed in .NET) that I'd like to add /programmatically/ to a running Azure Web App. I have access to management certificate or ARM token that WebApp is running under. I'm using .NET code to talk to Azure Management API, so examples with their Management libraries are preferred
I've looked at the client.WebSites.UpdateConfiguration call and its HandlerMappings property, but these look to be Website extensions that are shown as HTML pages that help manage the WebApp, not analyze live traffic.
Basically, I need to add custom .NET DLL library that analyzes web requests.
Not sure of any specific way. But Can be Done in your App Start
Please Follow the link
http://blog.davidebbo.com/2011/02/register-your-http-modules-at-runtime.html

Mobile App backend does not show in existing Web Apps

I'm following the procedure to create a Xamarin app with a mobile app backend in Azure.
https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-dotnet-backend-xamarin-android-get-started-preview/
I've create the mobile app in the portal and downloaded the backend runtime and xamarin solutions. When I try to publish the backend runtime, the instructions indicate that the one I just created should show up 'Existing Web Apps'. Mine shows nothing.
My questions are:
1) How can I troubleshoot what shows up in the 'Existing Web Apps'?
2) Is it reasonable to just create a new web app from the VS Publish dialog?
3) If not, where should I place the publish profile that I can download from the azure portal?
Regards,
Rajesh
1.a. Ensure you're using the right azure suscription from VS
1.b. Logout and add your subscription login again
Yes it's reasonable
You can put it wherever you want. From VS website project goto publish settings
4. Then select import
5.And Finally browse the publish settings file
I have had issues with Visual Studio finding the existing apps. I tend to download the publish settings and use that instead. This works fine.
Alternatively, create a git repository and check the code into the git repository. Check out this article for instructions: https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/
Personally, I post my code to a branch of my git repository on GitHub and link the continuous deployment option of the Azure App Service to that. You can find my blog about this topic here: http://shellmonger.com/2015/08/29/continuous-deployment-nodejs-and-microsoft-azure/ - it's for NodeJS but the concept and methodology is the same.

Resources