How do I make the .listen work in node.js for my gcp server. I put in the external IP, and I get this error message: (repost at a more popular time)

六月ゝ 毕业季﹏ 提交于 2019-12-24 20:27:06

问题


events.js:160 throw er; // Unhandled 'error' event= Error: listen EADDRNOTAVAIL 104.154.26.2:3000

104.154.26.2 is my external ip The .listen looks like this:

 serv.listen(3000,"104.154.26.2");

I know I should somehow bind the ip address to 0.0.0.0 and that there is some firewall stuff to do, but loads of time researching did nothing.

来源:https://stackoverflow.com/questions/48932652/how-do-i-make-the-listen-work-in-node-js-for-my-gcp-server-i-put-in-the-extern

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!