Express.js 中的 Rails Gems 等价物是什么?
Express.js 是否有某种相当于 Rails“Gems” 的东西?具体来说,我正在寻找可以有效读取 RSS 提要的东西,包括接受格式不良的 XML 文件的能力,但我真正的问题是:我从哪里开始寻找? (或者 Express.js 还太年轻,没有扩展库吗?)
Is there some kind of equivalent of Rails "Gems" for express.js? Specifically I'm fishing around for something that can read in RSS feeds efficiently, including the ability to accept poorly formed XML files, but my real question is: where do I even get started looking? (or is Express.js too young to have an extension library?)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
很多人将express与ROR进行比较,但应该这样做,因为作者也确实将其与sinatra而不是ROR进行比较。
如果你还没有安装npm(可能需要安装express?)你应该安装 我认为你可以将 npm 与 gem 进行比较。通过 http://search.npmjs.org 搜索
rss
时,我发现了以下内容可能有用的包:A lot of people compare express to ROR, but should, as the author also does compare it to sinatra instead of ROR.
If you haven't already installed npm(probably have to install express?) you should. I think you can compare
npm
togem
. When searching forrss
via http://search.npmjs.org I found the following package which could be useful:从哪里开始查找:
Where to start looking:
Express.js 具有可以充当表达/连接中间件的模块。 everyauth 和 session(已与 connect 捆绑在一起)向 Express 和 Connect 添加附加功能。 Express 构建在 Connect 之上。
Connect 中已包含几个出色的模块
快速了解 Express 如何使用中间件。
Express.js has modules that can act as middleware to express/connect. Modules such as everyauth and session (which is already bundled with connect) add additional functionality to Express and Connect. Express is built on top of Connect.
Several great modules already included into Connect
A quick primer on how Express uses middleware.
我具体不太确定 Express,但我知道 Node.js
npm
命令可以让您安装 Node 包。I'm not sure about Express specifically, but I know about Node.js
npm
command that lets you install Node packages.Alfred的回答非常好,我只是想指出,你不应该想到“Express Gems”,就像你不应该想到“Rails Gems”一样,而应该想到“Node.js Gems”和“Ruby Gems” ”。
您可以将 Ruby 与 Node(因为它们都是语言)、Sinatra(也许还有 Rails,但不是 100%)与 Express.js 进行比较。
因此,您可以使用 npm 安装 Node.js 的软件包。 Express.js 就是这样一个包(“gem”)。如需更多软件包 搜索 npm
如果您对 Express.js 中间件感兴趣,请查看这里的Express 维基页面
Alfred's answer is very good, I just want to point out that you shouldn't think of "Express Gems" just like you shouldn't think of "Rails Gems", but instead think of "Node.js Gems" and "Ruby Gems".
You can compare Ruby with Node (as they are both languages), Sinatra (and perhaps Rails, but not 100%) with Express.js.
So there are packages for Node.js which you can install with npm. Express.js is such a package ("gem"). For more packages search npm
If you are interested in Express.js middleware, look here on the Express wiki page