最新回答 / 呼呼哥
var path = require('path');// 引入path模块的作用:因为页面样式的路径放在了bower_components,告诉express,请求页面里所过来的请求中,如果有请求样式或脚本,都让他们去bower_components中去查找var mongoose = require('mongoose'); // 加载mongoose模块mongoose.connect('mongodb://localhost:27017/imovie'); // 连接mongodb本地数据库imo...
2017-06-30
最新回答 / ochai
我和改为://admin post movieapp.post('/admin/movie/new', function(req, res) { var id = req.body['movie[_id]']; var movieObj = req.body; var _movie; if(id !== 'undefined') { Movie.findById(id, function(err, movie) { if(err) { console.log(err); } _mo...
2017-06-29
最新回答 / 慕移动9181930
elseif($sex==quot;女quot;);{这多了个;号你的条件结构就结束了,后面的代码就只按顺序翻译出来了所就结果就是2300是从边框开始的
2017-06-27
已采纳回答 / 慕少1471586
var query = Person.findOne({ 'name.last': 'Ghost' });// selecting the `name` and `occupation` fieldsquery.select('name occupation');// execute the query at a later timequery.exec(function (err, person) { if (err) return handleError(err); console.log('%s...
2017-06-23
最新回答 / IT丶杰
Cast to ObjectId failed for value "undefined" at path "_id"$ node app.jsimooc started on port3000(node:5188) DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()` instead, orset the `useMongoClient` option if using `connect...
2017-06-19