New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

xyj-service-locator

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xyj-service-locator

servive locator to seneca client

  • 0.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
2
Weekly downloads
 
Created
Source

service-locator

Build Status

service locator to seneca client,主要功能单独实例一次seneca-client,服务有则从map中取,无则从config取参数实例化返回,添加进map中,config没有则报错

Install

$ npm install xyj-service-locator --save

Usage

const Locator = require('service-locator');
const config = {
    "service1": {
        "port": 10001,
        "host": "localhost"
    },
    "service2": {
        "port": 10002,
        "host": "localhost"
    }
}
let serviceLocator = new Locator(config);

let service1 = serviceLocator.get("service1");

Test

$ mocha

License

@MIT

Keywords

FAQs

Package last updated on 15 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc