site icon indicating copy to clipboard operation
site copied to clipboard

Feeling confused with env SERVICES

Open 0x0a0d opened this issue 4 years ago • 5 comments

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 avatar Aug 28 '21 13:08 0x0a0d

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

0x0a0d avatar Aug 30 '21 02:08 0x0a0d

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

intech avatar Aug 30 '21 07:08 intech

@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?

0x0a0d avatar Aug 30 '21 07:08 0x0a0d

@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

intech avatar Aug 30 '21 07:08 intech

@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

0x0a0d avatar Aug 30 '21 07:08 0x0a0d