2

I am new to the mean stack. I want to build application having admin and client. So I built two angular 2 apps in my node. But I am not able to render admin app and client app based on router. For example when router is / my client app should render and on /admin my admin app should render.

Please help me to structure my directory an solution to my problem .I am using express for Routing.

Sebi
  • 3,879
  • 2
  • 35
  • 62
  • if you are building two separate applications just give a link(**localhost:3005**) to the Admin from Client having **Admin deployed at the 3005** port – Aravind Feb 08 '17 at 07:15
  • not able to get ur point – Sukhdeep Singh Feb 08 '17 at 09:41
  • reach me out in fb @aravind2109 – Aravind Feb 08 '17 at 09:43
  • When you are doing two different apps, then you mean different Angular2-Projects for this? Well, Angular2 with Webpack is producing a dist folder, so you can configure two different routes for two different dist folders just referencing the index.html file in that folder. – Myonara Feb 21 '17 at 18:31

1 Answers1

0

You have to assign different port to your both apps.

ng serve --port 4210 --live-reload-port 4950

Open your second project and fire above command.

See : Click here

Hemant Sankhla
  • 923
  • 12
  • 23