• Not Answered

JSS Angular App Multiple brands/sites

Hello guys,

 

I'm runing  JSS in connected mode in my Sitecore instance a JSS Angular application named angular-jss-app and the site/brand in Sitecore named MyJssAngularApp.  The host name is angular-jss-app.dev.local

I need also to create another site/brand in Sitecore named MySecondJssAngularApp that is going to use the same components as first application. The host name to be different like second-angular-jss-app.dev.local

I'm trying to figure out how I can create multiple sites using JSS Angular application angular-jss-app. I updated angular-jss-app.config and I setup 2 sites one for MyJssAngularApp and one for MySecondJssAngularApp  , also new binding in IIS, proxy and  in package.json i added script to build new site.

When I run 'jss deploy app' and I check the dist folder and in Sitecore I see only the initial application MyJssAngularApp.

 

I didn't find any information abut how I can make the setup for multiple sites. So I'm blocked in this point :(

Did somebody tried to setup multiple apps?

1 Reply

  • Make sure the hostnames are different if you have the same hostnames Sitecore always takes the first one.

    You can also try adding the site MySecondJssAngularApp before MyJssAngularApp like below:

    <site patch:before="site[@name='MyJssAngularApp']"
    inherits="website"
    name="MySecondJssAngularApp"
    hostName="second-angular-jss-app.dev.local"
    rootPath="/sitecore/content/MyJssAngularApp"
    startItem="/home"
    database="master" />