next.js icon indicating copy to clipboard operation
next.js copied to clipboard

Improved "Network" url in cli

Open kletse opened this issue 2 years ago • 4 comments

What?

Fix an old feature request to show the current ip address in the cli

Why?

Improve DX

How?

Look at the actual available network interfaces and use the first relevant IP. Picks an IPv4 or IPv6 hostname based on the hostname used to show the url for 'Local:', so both are of the same IP version.

fixes #11367 related to PR #22352

Example output: image

kletse avatar Nov 01 '23 12:11 kletse

@leerob Should be doable to actually unit test the function I added. Give me some time to figure this out over the weekend. 😀

kletse avatar Nov 08 '23 19:11 kletse

This is a feature that would make my life so much easier. Is there anyway I could help?

Could you add tests please?

I can't think of any way how the function in question can be tested as I have little to no experince in testing. Can you please tell how it should be tested, then I will try to add a test based on the requirement.

Thanks

BlankParticle avatar Jan 20 '24 10:01 BlankParticle

@kletse were you able to add some tests? This would be a nice feature for the devs

SrPatinhas avatar Feb 01 '24 17:02 SrPatinhas

Still want to pick this up again. Maybe this weekend, not sure. Family first 😅

kletse avatar Feb 01 '24 17:02 kletse