WSL: NodeJS Server Don't Open Port in Windows When Code Executes in WSL Environment

Windows 10 Version 1607 Build 14393.969

I run simple express.js example:

var express = require('express')
var app = express()

app.get('/', function(req, res) {
	res.send('Hello World!')
})

app.listen(3000, function() {
	console.log('Example app listening on port 3000!')
})

I have “real” IP address, and if I run this code in Windows CMD then port 3000 will be opened and to my server peoples can connected from the outside.

screenshot 273

But if I run this example in WSL then port 3000 will be closed and access to server only for me.

screenshot 274

Maybe this fixed in future Creators Update? Or not?

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Reactions: 1
  • Comments: 19 (3 by maintainers)

Most upvoted comments

@stehufntdev I record gif to show.

index_8476