我是 Node.js 的学习者。
推荐答案
这是过度简化, href =en.wikipedia/wiki/Express.js =noreferrer> Express.js 是 Node.js Ruby on Rails 或 Sinatra 是 Ruby 。
This is over simplifying it, but Express.js is to Node.js what Ruby on Rails or Sinatra is to Ruby.
Express 3.x是一个轻量级的Web应用程序框架帮助您将Web应用程序组织到服务器端的MVC架构中。您可以使用各种模板语言的选择(如 EJS , Jade 和 Dust.js ) 。
Express 3.x is a light-weight web application framework to help organize your web application into an MVC architecture on the server side. You can use a variety of choices for your templating language (like EJS, Jade, and Dust.js).
然后,您可以使用数据库,如 MongoDB 与 Mongoose (用于建模)为您的节点提供后端。 js应用程序Express.js基本上可以帮助您管理一切,从路由到处理请求和视图。
You can then use a database like MongoDB with Mongoose (for modeling) to provide a backend for your Node.js application. Express.js basically helps you manage everything, from routes, to handling requests and views.
Redis是一个键/值存储 - 通常用于Node.js中的会话应用。你可以做更多的事情,但这是我正在使用它。我使用MongoDB进行更复杂的关系,例如订单项< - >订单< - >用户关系。有一些模块(最值得注意的是connect-redis),它将与Express.js一起使用。您需要在服务器上安装 Redis 数据库。
Redis is a key/value store -- commonly used for sessions in Node.js applications. You can do a lot more with it, but that's what I'm using it for. I use MongoDB for more complex relationships, like line-item <-> order <-> user relationships. There are modules (most notably connect-redis) that will work with Express.js. You will need to install the Redis database on your server.
以下是Express 3.x指南的链接: http:// expressjs / guide.html
Here is a link to the Express 3.x guide: expressjs/guide.html
更多推荐
什么是Express.js?
发布评论