Dependencies between nested engines
See original GitHub issueHello,
Can you please help me to describe dependencies for following structure?
Host Application ->
service:ajax
Nested 1 (async routable) ->
service:socket
Nested 1.1 (async routable)
-> how to pass socket service via dependencies from 1 to 1.1 ?
Nested 1.2
Nested 2 (async)
In host app I could write something like this in app.js, but the trouble is that socket service is not available until I load it.
Nested1.1: {
dependencies: {
services: ['ajax', 'socket']
}
}
I tried to write it in Nested1 engine.js file, but it seems Nested1.1 is looking for dependencies in Host app and not in parent engine ? service:socket is quite big and I wouldn’t want to move it on Host level.
If this make sense routes in Nested 1 described like this
export default buildRoutes(function() {
this.route('participant', { path: '/:id' }, function() {
this.route('index', { path: '/' }, function() {
this.mount('viewer'); // This is Nested 1.1 mount
});
});
});
I finally shared socket as a property of the global app service, but do not think it’s good.
Thank you.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:8
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Declaring Dependencies between Subprojects
Project dependencies model dependencies between modules. Effectively, you are saying that you depend on the main output of another project. In a Java-based ......
Read more >Azure ARM dependencies between nested templates
I've created a template that has two nested templates. The first nested template defines an SQL server as:
Read more >'Nested' dependencies question - Forum - SolarWinds THWACK
For each site, I setup a dependency with the PAN firewall node as the parent, and a group containing all remaining nodes (switches...
Read more >DependsOn attribute - AWS CloudFormation
It automatically determines which resources in a template can be parallelized and which have dependencies that require other operations to finish first. You...
Read more >package.json - npm Docs
If you need to make specific changes to dependencies of your dependencies, for example replacing the version of a dependency with a known...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m running into this issue as well but with
externalRoutes
dependencies. I have an engine that I mount to the host app and also to another engine that is mounted to the same host app.But when
Engine A
tries to route toroute-dep
fromEngine B
, instead of routing toengine.b.route
it routes tohost.app.route
Is there a way around this?So is there any possibility that this will be addressed in near future? @catz @stefanpenner