nodejs Express 3.0 [英] nodejs express 3.0

查看:84
本文介绍了nodejs Express 3.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个nodejs express 2.0应用程序,我想在其中使用express 3.0。请告诉我,目前Express 3.0的状态是什么,并且有Express 3.0应用程序的示例吗?

I have a nodejs express 2.0 application and I want to use express 3.0 within it. Tell me please which is state of express 3.0 at now and is there examples of express 3.0 applications?

我看到connect 2.0已发布,所以我可以将它与express一起使用吗? 2.0吗?

I saw connect 2.0 has been released, so can I use it with express 2.0 ?

推荐答案

在执行 npm install express后,我的应用程序也遇到了相同的问题

TJ升级了版本3,并添加/删除了一些功能(更好或更糟的是,我仍然确定:P)

TJ has upgraded version 3 and added/removed some features (better or for worse Im still ascertaining :P )

但是必须确保在默认应用程序上进行更改的两件事是更改:

But the 2 things you need to MAKE sure to change on a default application is change:

app.register ..

至:

app.engine

要知道dynamicHelpers和助手不再存在。您必须使用

And to know that dynamicHelpers and helpers are no longer there. You have to use

app.locals.use

强烈建议阅读他的迁移指南:

Strongly recommend reading his migration guide:

https://github.com/visionmedia/express/wiki/从2.x迁移到3.x

TJ已更新了他的一些示例(并且在更新其他示例中),我发现了将其重新拾起的好帮手

TJ has had some of his examples updated (and in the process of updating others) which I found a good helper to picking it back up

https://github.com/visionmedia/express/

这篇关于nodejs Express 3.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆