File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import express from 'express';
22import { env , eureka } from '@greeting/shared' ;
33
44const app = express ( ) ;
5- const eurekaClient = await eureka . getClient ( env . port ) ;
5+ const eurekaClient = await eureka . getClient ( ) ;
66
77app . get ( '/greeting' , async ( req , res ) => {
88 const salutation = req . query . salutation || 'Hello' ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import express from 'express';
22import { env , eureka } from '@greeting/shared' ;
33
44const app = express ( ) ;
5- const eurekaClient = await eureka . getClient ( env . port ) ;
5+ const eurekaClient = await eureka . getClient ( ) ;
66
77// Counter for round-robin load balancing
88let instanceCounter = 0 ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { Eureka } from 'eureka-js-client';
66const addressInfo = services . getAddressInfo ( 'p.service-registry' ) ;
77
88// Initializes and returns a Eureka client.
9- const getClient = async ( port ) => {
9+ const getClient = async ( ) => {
1010 const client = new Eureka ( {
1111 // Auth configuration
1212 requestMiddleware : async ( requestOpts , done ) => {
@@ -22,11 +22,11 @@ const getClient = async (port) => {
2222 ipAddr : application . getInternalIpAddress ( ) ,
2323 instanceId : `${ application . getHostname ( ) } :${ application . getInstanceId ( ) || '0' } ` ,
2424 port : {
25- $ : port ,
25+ $ : 80 ,
2626 '@enabled' : true ,
2727 } ,
2828 securePort : {
29- $ : port ,
29+ $ : 443 ,
3030 '@enabled' : true ,
3131 } ,
3232 vipAddress : 'UNKNOWN' ,
You can’t perform that action at this time.
0 commit comments