Home > Net >  How to run two Angular projects at a time same port angular
How to run two Angular projects at a time same port angular

Time:03-18

here i am create multi projects like user , artists and i am running server only user app is working artists projects not working but different port working fine.but i want to same prot like(localhost:4000 it user and localhost:4000/artists its artists) .how to single port to call two projects

here i am create multi projects like user , artists and i am running server only user app is working artists projects not working but different port working fine.but i want to same prot like(localhost:4000 it user and localhost:4000/artists its artists) .how to single port to call two projects

CodePudding user response:

You only have to host both project on their respective directory (IIS configuration needed) and build/deploy your apps with the base-href option:

ng build --prod --base-href=/admin // admin app
ng build --prod // public app

CodePudding user response:

It would be possible to combine them under one project.

{
  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
  "version": 1,
  "newProjectRoot": "projects", 
  "projects": {
    "artists": {
         //This section contains the setting for the artists project      
    },
    "user": {
        //This section contains the setting for the user project
    }},
  "defaultProject": "artists"    
}
 

I believe you are looking for something like this: https://www.tektutorialshub.com/angular/angular-multiple-apps-in-one-project/

  • Related