question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow to serve multiple applications at once

See original GitHub issue
  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed
  • I’m reporting the issue to the correct repository (not related to Angular, AngularCLI or any dependency)

Expected Behavior

Not easy to work with backend + frontend together when backend is build as microservice. And if you use Angular Console you can’t run more than 5 project together.

Current Behavior

At my company we currently working with backend as microservice architecture managed by Lernajs. Working fine but looking for moving to Nr to be able to have a better code sharing without npm publishing. We have multiple backend service (express) and frontend application (angular), we want to run together some of our backend service with one of our frontend application. I’ve try many thing to run multiples application front/backend with only once commande and the only solution have find is using concurrently to run multiple ng serve <project-name> together but when you have more than 10 project to run, it does not work anymore because it uses too much system

It will be nice to have a better solution for very large entreprise applications architecture

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

11reactions
vsavkincommented, Jun 19, 2019

@FazioNico the best option would be to define a custom target that serves a collection of microservices together. You can do it as follows in your angular.json:

{
  "projects": {
      "frontend-1": {
         "architect": {
            "serve-with-services": {
                "builder": "@nrwl/workspace:run-commands",
                "options": {
                  "commands": [
                      {
                        "command": "ng serve microservice-1"
                      },
                      {
                        "command": "ng serve microservice-2"
                      },
                      {
                        "command": "ng serve frontend1"
                      }
                  ],
                  "parallel": true
                }
             }
         }
      }
   }
}
0reactions
stefan-karlssoncommented, Sep 24, 2019

@numerical25 I just tried out the proposed solution and it works fine in my Angular 8/Nest project. I just executed ng run <application-name>:serve-with-services

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can we add multiple applications on a single server? - Quora
Of course you can. You mayinstall multiple server programs on the same physical server. However, the modern trend is to run each application...
Read more >
Running Multiple Applications on the Same Application Server
Running Multiple Applications on the Same Application Server · Add an app to the stack for each application. · Obtain a separate subdomain...
Read more >
Multiple application on single PC [closed] - Server Fault
Is this possible to have multiple address on single PC? You can use the whole 127.0.0.0/8 network locally. This means all addresses from ......
Read more >
How to deploy multiple applications together - Stack Overflow
1 Answer 1 · Can be handled. Two ClickOnce installs both containing the service. · This should work as long as you can...
Read more >
Multiple apps in a single project - Platform.sh Documentation
No matter how many apps you have in one project, they're all served by a single router for the project. To let your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found