#Microservice name
9 messages · Page 1 of 1 (latest)
Isn't that the same question? #1230245533919219797 message
kinda, however I want to access the microservice name at execution time if possible.
How do you define "microservice name"?
Could you set it as an environment variable and access it through ConfigService?
npm run start <microservice name>
yeah that could be
but for accessing it I need name and for that I can just type its name
I wanted do sometihing like this:
await app.listen(configService.get(`ports.${this.microservice.name}`))
so it would be dynamic and assign corresponding ports defined in config files to corresponding microservices