简体   繁体   English

Node.js Rest框架

[英]Node.js Rest Framework

I plan to write a rather large-scale web application using JavaScript. 我计划使用JavaScript编写一个相当大规模的Web应用程序。 I believe I will be developing the webapp using CanJS to organize my client-side pieces. 我相信我将使用CanJS开发Webapp来组织我的客户端程序。

I am strongly considering using Node.js for my server-side component, but I was wondering what the best way to set up Node to accept and handle REST requests. 我强烈考虑将Node.js用于服务器端组件,但是我想知道设置Node以接受和处理REST请求的最佳方法是什么。 I did some Googling and came across something called Express. 我做了一些谷歌搜索,发现了一个叫做Express的东西。 Any comments on this? 对此有何评论?

Any help/suggestions would be greatly appreciated. 任何帮助/建议将不胜感激。

restify is a node.js module built specifically to enable you to build correct REST web services. restify是一个node.js模块,专门用于使您能够构建正确的REST Web服务。

http://mcavage.github.com/node-restify/ http://mcavage.github.com/node-restify/

Express is more directed towards full web application (rendering HTML, etc). Express更面向完整的Web应用程序(呈现HTML等)。 Restify is just for web services. Restify仅用于Web服务。

Besides, the guy who created Restify works at Joyent, the company where Ryan Dahl developped Node.js (which is kind of guarantee quality). 此外,创建Restify的人还在Joyent工作,该公司是Ryan Dahl在其开发Node.js的公司(这是一种保证质量)。

对于REST请求处理, express-resource是比Railwayjs更为集中的解决方案,后者也是在expressjs之上构建的。

You can try http://railwayjs.com/ it is build on top of http://expressjs.com/ 您可以尝试http://railwayjs.com/,它是建立在http://expressjs.com/之上的

Express is nice and fast :) railway has similar stack to ruby on rails. Express很不错而且很快速:)铁路与红宝石在铁轨上的堆积相似。

http://expressjs.com is the de factor standard, does Sinatra-like routing. http://expressjs.com是要素标准,可以进行类似于Sinatra的路由。 If you want real easy automatic generation of resources (sort of Rails-style), try one of those libraries above. 如果您想真正轻松地自动生成资源(某种Rails风格),请尝试上面的那些库之一。

If you want it real simple on top of express, try http://github.com/deitch/booster 如果您想在快递上做到真正的简单,请尝试http://github.com/deitch/booster

Disclosure: I just released Booster this week. 披露:我本周刚刚发布了Booster。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM