NodeJS 框架 Express 从 3.0升级至4.0的新特性
[原文地址:√https://scotch.io/bar-talk/expressjs-4-0-new-features-and-upgrading-from-3-0]
首先是升级的中间件如下:
Express 3.0 Name | Express 4.0 Name |
bodyParser | body-parser |
compress | compression |
cookieSession | cookie-session |
logger | morgan |
cookieParser | cookie-parser |
session | express-session |
favicon | static-favicon |
response-time | response-time |
error-handler | errorhandler |
method-override | method-override |
timeout | connect-timeout |
vhost | vhost |
csrf | csurf |
-
-