moleculer icon indicating copy to clipboard operation
moleculer copied to clipboard

feat(runner): load service by matched path

Open 0x0a0d opened this issue 2 years ago • 2 comments

I have written about this problem with env SERIVCES: moleculerjs/site#160 I think SERVICES should first prefer to service's name This pull will allow loading service from SERVICES if any service's file ends with {SERVICE_ENV_VALUE}.service.[tj]s

0x0a0d avatar Jan 30 '23 04:01 0x0a0d

Could you write an exact example where the original code doesn't load the desired files?

icebob avatar Jan 30 '23 19:01 icebob

Example:

.
└── src/
    └── services/
        └── counter/
            ├── counter-peter.service.js
            └── counter-marry.service.js

With SERVICEDIR=src/services

  • SERVICES=counter-marry, there are no service found
  • But SERVICES=counter will load both counter-peter, counter-marry (all *.service.js in counter folder)

0x0a0d avatar Jan 30 '23 21:01 0x0a0d