File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
12-scalability-and-architectural-patterns/07-peer-to-peer-load-balancing Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ const server = createServer((req, res) => {
55 const url = new URL ( req . url , `http://${ req . headers . host } ` )
66 const searchParams = url . searchParams
77
8- console . log ( `Handling request ${ searchParams . get ( 'request' ) } from ${ pid } ` )
8+ console . log ( `Request ${ searchParams . get ( 'request' ) } from ${ pid } ` )
99 res . end ( `Hello from ${ pid } \n` )
1010} )
1111
Original file line number Diff line number Diff line change @@ -3,7 +3,5 @@ import { balancedRequest } from './balancedRequest.js'
33for ( let i = 0 ; i < 10 ; i ++ ) {
44 const response = await balancedRequest ( `/?request=${ i } ` )
55 const body = await response . text ( )
6- console . log (
7- `Request ${ i } completed\nStatus: ${ response . status } \nBody: ${ body } `
8- )
6+ console . log ( `Req ${ i } completed\nStatus: ${ response . status } \nBody: ${ body } ` )
97}
You can’t perform that action at this time.
0 commit comments