moleculerjs / site

:globe_with_meridians: Official website for Moleculer
https://moleculer.services
21 stars 71 forks source link

Feeling confused with env SERVICES #160

Open 0x0a0d opened 2 years ago

0x0a0d commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

0x0a0d commented 2 years ago

@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 commented 2 years ago

@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 commented 2 years ago

@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