DEV Community

Shalvah
Shalvah

Posted on • Originally published at blog.shalvah.me

1

Connecting to a Windows server process from WSL

No big revelation here, just writing this as a reminder to myself next time I try curl localhost from WSL and it doesn't work:

  1. Don't use localhost or 127.0.0.1. Use your machine IP. But you shouldn't even need to figure this out. Using your-computer-name>.local should work (eg curl Joshs-PC.local. Even better: curl $(hostname).local.
  2. Make sure your server is listening on 0.0.0.0, not 127.0.0.1.

Source: this excellent StackOverflow answer.

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay