moleculer-decorators icon indicating copy to clipboard operation
moleculer-decorators copied to clipboard

Allow service name to be writable

Open ariesclark opened this issue 3 years ago • 0 comments

import Moleculer from "moleculer";
import { Service } from "moleculer-decorators";

import HttpGateway from "moleculer-web";

@Service()
export default class HttpService extends Moleculer.Service {
	public mixins: any = [HttpGateway]
	public name = "http";
}

This change allows the above name assignment to work; without this change it throws an error about writing to a read only field.

ariesclark avatar Sep 04 '21 04:09 ariesclark