Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V2] Initialize services by default #733

Merged
merged 6 commits into from
May 29, 2020
Merged

[V2] Initialize services by default #733

merged 6 commits into from
May 29, 2020

Conversation

LoicPoullain
Copy link
Member

@LoicPoullain LoicPoullain commented May 29, 2020

Issue

Services can be initialized using their boot method. For this to work, we currently need to call ServicesManager.boot() in src/index.ts.

In version 2, this feature is enabled by default. No need to call ServicesManager.boot() anymore.

Solution and steps

  • Call ServiceManager.boot in createAndInitApp.
  • Use MongoDBStore.boot.
  • Use RedisStore.boot.
  • Use createAndInitApp in acceptance tests.

How to upgrade (to include in v2 release)

If you use the boot feature, remove the ServiceManager.boot() call from src/index.ts

If you do not use the boot feature, the property boot in every service/controller is now a reserved keyword (cf service initialization).

Checklist

  • Add/update/check docs (code comments and docs/ folder).
  • Add/update/check tests.
  • Update/check the cli generators.

@LoicPoullain LoicPoullain added this to Work In Progress in Issue tracking May 29, 2020
@LoicPoullain LoicPoullain merged commit 26892a7 into v2-0-0 May 29, 2020
Issue tracking automation moved this from Work In Progress to Done / Closed This Release May 29, 2020
@LoicPoullain LoicPoullain deleted the service-auto-init branch May 29, 2020 12:55
@LoicPoullain LoicPoullain mentioned this pull request May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Issue tracking
  
Done / Closed This Release
Development

Successfully merging this pull request may close these issues.

None yet

1 participant