nodejs 可以安装在免费的虚拟主机上吗
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7550136/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Can nodejs be installed on a free webhost
提问by mowwwalker
My goal is to create a chatting website. Not so much for the sake of the website, but for the experience so I know how; just something to work towards gradually. I tried long polling, but that always ends up pissing off the webhosts whose servers I'm using. I was told to use nodejs instead. I have some idea of what it is, but no idea how to use it.
我的目标是创建一个聊天网站。不是为了网站,而是为了体验,所以我知道如何;只是需要逐渐努力的东西。我尝试过长时间轮询,但最终总是惹恼我正在使用其服务器的网络主机。我被告知改用 nodejs。我知道它是什么,但不知道如何使用它。
I'm guessing that the reason I can't find the answer to this question anywhere is because of how obvious it is... to everyone else.
我猜我在任何地方都找不到这个问题的答案的原因是因为它是多么明显......对其他人来说。
I've been looking around and all I see are tutorials on installing it on your server when you own the server. I know you can install forums on webhost's servers, so can you also install nodejs?
我一直在环顾四周,我看到的只是有关在您拥有服务器时在服务器上安装它的教程。我知道你可以在 webhost 的服务器上安装论坛,那么你也可以安装 nodejs 吗?
回答by ace
Yes. You can check the full listing at https://github.com/joyent/node/wiki/Node-Hostingto check each site but it does not categorize it by free hosting.. Some I know of, I personally use Heroku.
是的。您可以在https://github.com/joyent/node/wiki/Node-Hosting查看完整列表以检查每个站点,但它不会按免费托管对其进行分类。我知道的一些,我个人使用 Heroku。
回答by EhevuTov
Most standard LAMP hosting companies don't let you run node.js.
大多数标准 LAMP 托管公司不允许您运行 node.js。
I currently recommend you use the Cloud9 IDEto get up and running with not only your tests and development, but also potential deployment. Cloud9 allows you to run your app from their IDE and will provide you with URL to see your app running and get familiar with node.js development.
我目前建议您使用Cloud9 IDE来启动和运行您的测试和开发,以及潜在的部署。Cloud9 允许您从他们的 IDE 运行您的应用程序,并将为您提供 URL 以查看您的应用程序正在运行并熟悉 node.js 开发。
A more manual way is to find a node.js PAAS (Platform as a Service) such as Joyentor Nodester.
回答by Steve Mc
Another one is Open Shift. I use them a lot and they allow you to use your own domain on the free plan. I use Heroku as well and have tried AppFog and Modulus.
另一个是Open Shift。我经常使用它们,它们允许您在免费计划中使用自己的域。我也使用 Heroku 并尝试过 AppFog 和 Modulus。
But what it comes down to is whether I can use my own domain and how much they throttle my traffic. AppFog and Modulus don't allow custom domains on their free plans and seriously throttle traffic. They will cut your website off if you have one visitor an hour.
但归根结底是我是否可以使用我自己的域以及他们限制了我的流量。AppFog 和 Modulus 不允许在其免费计划中使用自定义域并严重限制流量。如果您每小时有一个访问者,他们会切断您的网站。
Another issue I was concerned about was with the upload of files. In particular, with my website content is added via markdown files. Most node webhosts use a variation on git deploys to update websites, with content supplied by databases. However, if you are trying to run a website without a database, using flat files, then each update must be done by a git deploy. This takes the whole website down and recreates a new website altogether (it just happens to look like the previous one). This will normally take a few minutes. Probably not a problem for a low volume website. But imagine if you are making a blog entry and you deploy it and then notice you've made a spelling mistake. You need to do a deploy all over again.
我担心的另一个问题是文件的上传。特别是,我的网站内容是通过降价文件添加的。大多数节点网络主机使用 git 部署的变体来更新网站,内容由数据库提供。但是,如果您尝试使用平面文件在没有数据库的情况下运行网站,则每次更新都必须由 git deploy 完成。这会关闭整个网站并重新创建一个新网站(它恰好看起来像以前的网站)。这通常需要几分钟。对于低容量网站来说可能不是问题。但是想象一下,如果您正在制作一个博客条目并部署它,然后注意到您犯了一个拼写错误。您需要重新进行部署。
So, one of the things that attracted me to Open Shift was that they have a reserved area for flat files within your project. You can upload your files there and when your project is re-started these files will be preserved.
因此,Open Shift 吸引我的一件事是它们为您的项目中的平面文件保留了一个区域。您可以在那里上传您的文件,当您的项目重新启动时,这些文件将被保留。
回答by vinyll
回答by broofa
There is also the Node.js Smart Machine servicefrom Joyent.
还有来自 Joyent的Node.js Smart Machine 服务。

