码迷,mamicode.com
首页 >  
搜索关键字:mpj express    ( 3961个结果
[Express] Level 2: Middleware -- 2
Logging MiddlewareHelp finish the following middleware code in thelogger.jsfile:On theresponseobject, listen to the event that's emitted when the resp...
分类:其他好文   时间:2014-12-04 06:20:38    阅读次数:1971
[Express] Level 2: Middleware -- 1
Mounting MiddlewareGiven an application instance is set to theappvariable, which of the following function calls would you use to mount a middleware c...
分类:其他好文   时间:2014-12-04 06:19:38    阅读次数:244
node的express中间件之session
虽然session与cookie是分开保存的.但是session中的数据经过加密处理后默认保存在一个cookie中.因此在使用session中间件之前必须使用cookieParser中间件.app.use(express.session([options]));options参数的具体取值:key:...
分类:其他好文   时间:2014-12-03 22:55:27    阅读次数:170
全局安装了express框架,但是无法使用express指令的问题
错误截图:产生这个错误的原因是:我安装的是express4版本,需要安装express-generator才能使用express命令将express-generator安装后就都解决了:
分类:其他好文   时间:2014-12-03 18:52:51    阅读次数:490
[Node.js] Express的测试覆盖率
代码覆盖率(Code coverage)是软件测试中的一种度量,描述程式中源代码被测试的比例和程度,所得比例称为代码覆盖率。本文关注的是使用express web框架时如何进行覆盖率测试。
分类:Web程序   时间:2014-12-03 18:46:14    阅读次数:440
用express创建网站出现"$ DEBUG=microbog ./bin/www"的提示
第一次用express框架创建网站,指令为:“express -t ejs microblog”,如下图指令运行完成后,出现如图框中的提示,不知道什么意思,运行:“node app.js”来启动服务没有反应,郁闷!!查阅了相关资料才知道,程序没有问题,应该用:“npm start”指令来启动服务。启...
分类:Web程序   时间:2014-12-03 18:33:07    阅读次数:400
Evaluate Reverse Polish Notation
Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another express...
分类:其他好文   时间:2014-12-03 12:14:39    阅读次数:169
node.js+express+mongodb
主要是想用node.js链接mongodb,用的是mongoose。用ejs引擎,扩展到.html比较容易小例子结构简单,框架清晰。提交方法路径方法作用getaddpostadd提交记录getdelgetmodify转到修改页面postmodify修改记录入口:mongodb.js,数据模型:mod...
分类:数据库   时间:2014-12-03 00:13:59    阅读次数:312
node中express的中间件之methodOverride
methodOverride中间件必须结合bodyParser中间件一起使用,为bodyParser中间件提供伪HTTP方法支持.index.html代码: 1 2 3 4 5 向服务器上传文件 6 19 20 21 23 姓:24 名:25 ...
分类:其他好文   时间:2014-12-02 23:51:02    阅读次数:298
nodejs+express-> http 访问本地json数据
首先要把json 放入public文件目录下:在config.js里面定义domainUrlexports.domainUrl = 'http://localhost:3000';在 index.js中var config = require('../config');var domainUrl =...
分类:Web程序   时间:2014-12-02 18:43:46    阅读次数:360
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!