Home
Sign Up
Sign In
Advertisement
V2EX
›
Node.js
为什么我只监听端口,局域网的机器无法访问我的Express服务器
coolicer
·
Oct 12, 2013
· 6016 views
This topic created in 4657 days ago, the information mentioned may be changed or developed.
只有一个app.listen(3000),防火墙什么的都没有。
无法访问
listen
App
6 replies
•
1970-01-01 08:00:00 +08:00
1
Livid
MOD
PRO
Oct 12, 2013
如果试试 app.listen(3000, '0.0.0.0') 呢?
2
coolicer
OP
Oct 12, 2013
@
Livid
试过了,它没有监听IP应该跟0.0.0.0的效果一样吧。我不知道哪里出错,慢慢找。
3
jasontse
Oct 12, 2013 via iPad
netstat -ln
4
leofml
Oct 12, 2013
试试 python -m SimpleHTTPServer 3000 能不能用
5
coolicer
OP
Oct 12, 2013
不好意思,我懂了。我是虚拟机里的服务器...
@
leofml
6
timothyye
Oct 31, 2013
@
coolicer
把虚拟机的网卡设成桥接模式,分配到一个局域网里的IP,就行了。
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Solana
·
2893 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 39ms ·
UTC 15:04
·
PVG 23:04
·
LAX 08:04
·
JFK 11:04
♥ Do have faith in what you're doing.
❯