是否建议使用 node.js 建立论坛?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8267445/
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
Is it recommended to build a forum using node.js?
提问by alexchenco
I've heard that node.js is really fast for applications like chats and real time apps. I was wondering if node is a good choice to develop a forum or a q&a site like StackOverflow?
我听说 node.js 对于聊天和实时应用程序等应用程序来说非常快。我想知道 node 是否是开发论坛或 StackOverflow 等问答网站的好选择?
回答by alessioalex
Yes it's perfectly possible, you don't have to implement your own web server like somebody said, you can just create it using something like Express(as a framework) and Mongoose(as a MongoDB ORM) or whatever you choose.
是的,这是完全可能的,您不必像有人说的那样实现自己的 Web 服务器,您可以使用Express(作为框架)和Mongoose(作为 MongoDB ORM)之类的东西或您选择的任何东西来创建它。
I think Node.js is a good solution for such a case because of its high concurrency (and Stack Overflow is a site where thousands of users are online in the same time probably). So yes you can achieve this with PHP, Ruby and Python etc, but I believe Node.js is a better fit (that's my opinion, based on the success stories I've heard which were based on Node).
我认为 Node.js 是这种情况的一个很好的解决方案,因为它的高并发性(而 Stack Overflow 是一个可能有数千名用户同时在线的站点)。所以是的,您可以使用 PHP、Ruby 和 Python 等实现这一点,但我相信 Node.js 更适合(这是我的观点,基于我听说过的基于 Node 的成功案例)。
Node isn't just a solution for building small services, here are some good examples ( https://nodejs.org/en/blog/uncategorized/an-easy-way-to-build-scalable-network-programs/).
Node 不仅仅是构建小型服务的解决方案,这里有一些很好的例子(https://nodejs.org/en/blog/uncategorized/an-easy-way-to-build-scalable-network-programs/)。

