我在 express.js 中开发了一个非常简单的注册表单,但是当我重定向并提交值时,快递给了我以下错误
500 TypeError: Object # has no method 'query'
at /home/nodes/Documents/Aptana Studio 3 Workspace/mysql/routes/index.js:79:8
at callbacks (/home/nodes/Documents/Aptana Studio 3 Workspace/mysql/node_modules/express/lib/router/index.js:272:11)
at param (/home/nodes/Documents/Aptana Studio 3 Workspace/mysql/node_modules/express/lib/router/index.js:246:11)
at pass (/home/nodes/Documents/Aptana Studio 3 Workspace/mysql/node_modules/express/lib/router/index.js:253:5)
at Router._dispatch (/home/nodes/Documents/Aptana Studio 3 Workspace/mysql/node_modules/express/lib/router/index.js:280:4)
at Object.handle (/home/nodes/Documents/Aptana Studio 3 Workspace/mysql/node_modules/express/lib/router/index.js:45:10)
at next (/home/nodes/Documents/Aptana Studio 3 Workspace/mysql/node_modules/express/node_modules/connect/lib/http.js:204:15)
at /home/nodes/Documents/Aptana Studio 3 Workspace/mysql/node_modules/express/node_modules/connect/lib/middleware/session.js:322:9
at /home/nodes/Documents/Aptana Studio 3 Workspace/mysql/node_modules/express/node_modules/connect/lib/middleware/session.js:337:9
at Array.0 (/home/nodes/Documents/Aptana Studio 3 Workspace/mysql/node_modules/express/node_modules/connect/lib/middleware/session/memory.js:57:7)</code>
我的代码可以从这里查看
thanx