大佬教程收集整理的这篇文章主要介绍了node.js – 在快捷框架中的会话中得到奇怪的错误,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
// Module dependencies. var application_root = __dirname,express = require( 'express' ),//Web framework path = require( 'path' ),//Utilities for dealing with file paths mongoose = require( 'mongoose' ); //MongoDB integration //Create server var app = express(); // Configure server app.configure( function() { app.use( express.bodyParser() ); app.use( express.methodOverride() ); app.use( app.router ); app.use(express.session({secret:'thisismysupersecret'})); app.use( express.static( path.join( application_root,'site') ) ); app.use( express.errorHandler({ dumpExceptions: true,showStack: true })); }); app.post("/verifyLogin",function(request,responsE){ var usr=request.body.username; var pass=request.body.password; //request.session.email=usr; response.redirect('dashboard'); }); //Start server var port = 3000; app.listen( port,function() { console.log( 'Express server listening on port %d in %s mode',port,app.setTings.env); });
当我导航到localhost:3000我得到这个错误
问题在哪里?
以上是大佬教程为你收集整理的node.js – 在快捷框架中的会话中得到奇怪的错误全部内容,希望文章能够帮你解决node.js – 在快捷框架中的会话中得到奇怪的错误所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。