service-locator
service locator to seneca client,主要功能单独实例一次seneca-client
,服务有则从map
中取,无则从config
取参数实例化返回,添加进map
中,config
没有则报错
Install
$ npm install xyj-service-locator --save
Usage
const Locator = ;const config = "service1": "port": 10001 "host": "localhost" "service2": "port": 10002 "host": "localhost" let serviceLocator = config; let service1 = serviceLocator;
Test
$ mocha
License
@MIT