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

feat(runner): load service by matched path #1181

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

0x0a0d
Copy link
Contributor

@0x0a0d 0x0a0d commented Jan 30, 2023

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

@icebob
Copy link
Member

icebob commented Jan 30, 2023

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

@0x0a0d
Copy link
Contributor Author

0x0a0d commented Jan 30, 2023

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)

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

Successfully merging this pull request may close these issues.

2 participants