Nit-Picking Magistrate

    node-eureka-client
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.1 • Public • Published

    node-eureka-client

    An IN DEVELOPMENT javascript/node.js client for Netflix Eureka

    Installation

    npm install node-eureka-client --save

    Usage

    import * as eureka from 'node-eureka-client'
     
    const instanceInfo = {
        appId: 'my-test-applicaton'
        /* ... more config ... */
    }
     
    const clientConfig = {
        fetchRegistry: true
        registerWithEureka: true
        registryFetchInterval: 30
        heartbeatInterval: 30
    }
     
    const transport = eureka.FetchEurekaTransport('http://<<eureka-server>>:<<port>>/<<base>>') // node-fetch based transport
     
    const client = new eureka.DiscoveryClient(instanceInfo, clientConfig, transport)
     
    // wait a bit
     
    client.getApplication('MY-APP').forEach(instanceInfo => {
        console.info(`found ${instanceInfo.instanceId}`)
    })
     
    // after you finish
    client.stop()

    Install

    npm i node-eureka-client

    DownloadsWeekly Downloads

    10

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    15.6 kB

    Total Files

    14

    Last publish

    Collaborators

    • mikhas