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.

Add configuration phase before http/rpc/ws servers launched

See original GitHub issue

There is a case when microservice should get/request some configuration (or load initial data from db to memory storage) from separate config service before his servers( http/rpc/ws) will be launched. Would be cool to have an opportunity to delay nest servers launch providing some function that returns Observable. This function should has access to app services and http/rpc requests to get/load initial data. Also there is related issue - what if nest servers config (e.x. launch ports) should be requested from separate config service (http/rpc request). Currently it requires non-framework code that would wrap nest launch before configs loaded.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:18 (10 by maintainers)

github_iconTop GitHub Comments

4reactions
kamilmysliwieccommented, Jul 16, 2017

Hey guys, In the nearest release it’d be possible to create an async components (factories & values). All components, which depends on async components, would be also async, so you can use them as a some kind of configuration phase.

{
     provide: 'AsyncDatabaseConnection',
     useFactory: async (...args): Promise<any> => {

     },
     inject: [...]
},

Those async components are just promises, which have to be resolved before http/rpc/ws servers launch and may be injected into another components.

1reaction
kamilmysliwieccommented, Sep 15, 2017

Hi @artaommahe, A little bit more about async components is available here

Read more comments on GitHub >

github_iconTop Results From Across the Web

Administering application servers - IBM
An application server configuration provides settings that control how an application server provides services for running applications and their components.
Read more >
Build Lifecycle - Gradle User Manual
Gradle determines the subset of the tasks, created and configured during the configuration phase, to be executed. The subset is determined by the...
Read more >
3 Common Installation Planning Tasks - Oracle Help Center
6/8. 3 Common Installation Planning Tasks. This chapter describes some common tasks that should be performed prior to beginning any Oracle Fusion Middleware ......
Read more >
Configuration - Capistrano
Configuration. Location. Configuration variables can be either global or specific to your stage. global. config/deploy.rb. stage specific.
Read more >
Create run/debug configuration for Gradle tasks - JetBrains
Before launch . In this area, you can specify tasks to be performed before starting the selected run/debug configuration ...
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