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

Feeling confused with env SERVICES #160

Open
0x0a0d opened this issue Aug 28, 2021 · 5 comments
Open

Feeling confused with env SERVICES #160

0x0a0d opened this issue Aug 28, 2021 · 5 comments

Comments

@0x0a0d
Copy link
Contributor

0x0a0d commented Aug 28, 2021

I think your mean about env SERVICES at Services loading logic, is to allow the developer to load exactly one or more services according to the value set for it. But in the real world, I feel like it's a group of services instead of services.
You can check my example https://stackblitz.com/edit/moleculer-project-demo-v6n8nd?file=services/a-group/test.service.js

config
image

Results:
image

Expected:
No services load

I'm submitting this because I think if you mean for it to actually load a group of services we should rename it SERVICESGROUP or if not, the site should be update to make it clear

@0x0a0d
Copy link
Contributor Author

0x0a0d commented Aug 30, 2021

In my case above, SERVICES cab be: **/product.service.[jt]s for loading product service
https://github.com/moleculerjs/moleculer/blob/34431aeb634a323159c89aff19c619e9ec8cd438/src/runner.js#L396

@intech
Copy link
Member

intech commented Aug 30, 2021

@0x0a0d You can load services from a specific folder SERVICEDIR=services/a-group/, there is no need to specify SERVICES.

@0x0a0d
Copy link
Contributor Author

0x0a0d commented Aug 30, 2021

@0x0a0d You can load services from a specific folder SERVICEDIR=services/a-group/, there is no need to specify SERVICES.

How if I only want to load test and product service?

@intech
Copy link
Member

intech commented Aug 30, 2021

@0x0a0d You can load services from a specific folder SERVICEDIR=services/a-group/, there is no need to specify SERVICES.

How if I only want to load test and product service?

SERVICEDIR=services and SERVICES=a-group/test,b-group/products

@0x0a0d
Copy link
Contributor Author

0x0a0d commented Aug 30, 2021

@0x0a0d You can load services from a specific folder SERVICEDIR=services/a-group/, there is no need to specify SERVICES.

How if I only want to load test and product service?

SERVICEDIR=services and SERVICES=a-group/test,b-group/products

yes, that was I meant. Documentation must be clear

@icebob icebob transferred this issue from moleculerjs/moleculer Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants