设置节点以使其在外部可见? [英] Set up node so it is externally visible?

查看:62
本文介绍了设置节点以使其在外部可见?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

新手问题-可能更适合ServerFault,如果这样的话,抱歉.

Newbie question - might be more appropriate for ServerFault, apologies if so.

我正在按照有关安装Node的出色howtonode说明,在Ubuntu 11.10上设置节点.

我可以在127.0.0.1:8000上运行"Hello World"页面,但是如何设置它使其显示在服务器的外部IP上?

I can get the Hello World page running on 127.0.0.1:8000, but how do I set it up to appear for my server's external IP?

我习惯于配置Apache-Apache的"Hello World"页面的节点等效点是什么?

I'm used to configuring Apache - what's the node equivalent of Apache's "Hello World" page?

感谢您的帮助.

更新:也许我需要的是有关托管Node的教程.如果有人可以提出一个好的建议,那就太好了.

UPDATE: Maybe what I need is a tutorial on hosting Node. Would be great if anyone could suggest a good one.

推荐答案

除非您将其绑定,否则无需进行任何配置即可使您的外部IP地址与node.js一起使用.

There is no configuration needed to make your external IP address work with node.js, unless and until you bind it otherwise.

代替 .listen(PORT,IP_ADDRESS_OR_HOST); 使用 .listen(PORT);

然后,只需使用 IP_ADDRESS_OR_HOST:PORT 进行访问即可.

Then, just use IP_ADDRESS_OR_HOST:PORT to access it.

这篇关于设置节点以使其在外部可见?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆