Node js 和 Express js 的区别

我是 NodeJs 的新手。快捷 JS 的用途是什么?根据我的理解,它是用于网络项目,并有一些像 Jade 和 CSS 模板。

Express.js 还有什么其他特性使得它比 node.js 更具统治力吗? 在服务器端编码方面,node.js 和 Express.js 哪一个更好? Express.js 和 node.js 之间的差异。

好心帮忙,谢谢。

82259 次浏览

Express js is built on top of the Node.js framework.

Express js uses node.js itself and provides more features to build applications on top Node.js

http://expressjs.com/, if you look at this link itself it says Express - node.js web application framework.

Express is built on top of Node, so yes Express adds more features. Node is just a Javascript environment with libraries to make it easy to write software, where Express extends Node specifically to make webservers easy to write.

Express/Connect adds the concept of middleware, a simplified way of managing different routes, automated integration with several templating engines and a bunch more.

The comparison is not entirely correct. The difference between node.js and express.js in the level of abstraction:

  1. Node.js is a run-time environment for building server-side event-driven i/o application using javascript.
  2. Express.js is a framework based on node.js for building web-application using principles and approaches of node.js

So, if you write web-application, you can try to use Express.js. In all other cases, it does not suit for you.