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

2.0.0 • Public • Published

This package is forked from nestjs-eureka, fixed some bugs related to async configuration

nests-eureka is a NestJS module that provides an integration with eureka-js-client

Getting Started

You need to import the EurekaModule in your application:

EurekaModule.forRoot({
    eureka: {
      host: 'eureka-service',
      port: 8761,
      registryFetchInterval: 1000,
      servicePath: '/eureka/apps/',
      maxRetries: 3,
    },
    service: {
      name: 'my-service',
      port: 8080,
    },
})

For automatically discovery service for HttpModule, use the uri pattern: service:<service_name>/<path> Example: httpService.get('service:user-service/users/admin')

Run Tests

npm run test
docker pull springcloud/eureka
docker run --rm -p 8761:8761 springcloud/eureka
npm run test:e2e

Package Sidebar

Install

npm i nest-eureka

Weekly Downloads

47

Version

2.0.0

License

MIT

Unpacked Size

120 kB

Total Files

45

Last publish

Collaborators

  • stupd