node.js - Alibaba Cloud linux (CentOS 6.8) deployment nodejs
天蓬老师
天蓬老师 2017-06-05 11:12:31
0
3
664

Nodejs newbie, I bought an Alibaba Cloud server with the lowest configuration. I want to deploy the nodejs project I wrote. The node version is 6.10.0.
But an error is reported during startup
Port number: 3000
ip is the public IP of Alibaba Cloud

Port usage 3000 is not in use:

Baidu tried many methods but couldn’t solve it! Ask the experts for advice. . .
code show as below:

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(3)
曾经蜡笔没有小新

The public network address of the minimum server you bought cannot be used to directly access the node server. It is recommended that nginx be used as a proxy for localhost.
The official explanation given by Alibaba Cloud.

Or change the hostname to: 127.0.0.1 and then access the public network address.
Reference: http://www.jianshu.com/p/0c8c...

过去多啦不再A梦

Hostname cannot specify the router IP. . . It can only be specified as the IP of the network card or: 0.0.0.0

黄舟

Remove hostname, app.listen method.

Did you specify that you want to listen on this network card?

So, ifconfig determines whether this IP is the IP of a certain network card on this machine

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template