compoundjs

    0热度

    1回答

    我有一个应用程序为每个用户创建2个会话。我找到了问题的根源,但我不完全明白为什么会发生,以及如何解决问题。比方说,我脚手架的示例应用程序,像这样: compound init blah cd blah npm install npm install connect-mongo compound g c mytest 让配置/ environment.js这个样子的: module.ex

    0热度

    1回答

    我在运行npm install后遇到了一个奇怪的问题。 当在requireManager()(或任何控制器)中访问时,req.user的实例是Array类型,而不是从passport.deserializeUser返回的对象。 passport.deserializeUser(function(id, done) { compound.models.User.findById(id, f

    0热度

    1回答

    我使用了复合的NodeJS图书馆, 主键是自动增加,插入数据库直通模型对象后,该对象具有ID为NULL,但在数据库中有正确的号码,怎么调用“save()”后得到这个数字? var user = new User(); user.name = Math.random(); user.save(); console.warn(user);//the user.id is

    1热度

    1回答

    我试图使用Compoundjs,Passportjs(复合护照)和Bcryptjs实现本地身份验证。 这里是我的代码: 定义新的战略 var Strategy = require('passport-local').Strategy; passport.use(new Strategy({ usernameField: conf.usernameField || 'email' },

    2热度

    1回答

    我正在使用compoundjs并使用jugglingdb的mongodb适配器。我一直在检索和通过执行以下操作重新使用控制器的native mongodb client: var db = compound.orm._schemas[0].client; 这个伟大的工程,因为我能够在最重要的是使用MongoDB的支持功能,如.collection(name)和.find()。但是,当我为复合j

    0热度

    1回答

    我需要对我在某些情况下,网站使用SSL, 我按照自述文件中的例子 ​​ 我server.js是 #!/usr/bin/env node var fs = require('fs'); /** * Server module exports method returning new instance of app. * * @param {Object} params - compound

    0热度

    4回答

    假设我有两个类Base和Child。 Base是Child将继承的基类。下面是这个可视化代码: Base.js function Base(init) { } function log() { console.log('here'); } Base.prototype.log = log; module.exports = Base; Child.js var Bas

    0热度

    2回答

    我现在疯了,我一直在花费一天的时间去应付一无所获。 我做 var cookie = req.cookies.my_user; if(!cookie){ console.log("not user"); res.cookie('my_user', user._id, {maxAge: 900000, httpOnly: false }); } 我运行的

    0热度

    1回答

    我目前正在研究nodejs中的webapp。我正在使用复合js表达框架。 我怎样才能把404页只使用routes.js?没有适当的文件来这样做。 我只想处理不可用的控制器操作。我无法做到。 在此先感谢。

    0热度

    2回答

    我正在为我的应用程序使用CompoundJS,现在尝试实现一个脚本,它将 将图像从复合j上传到azure blob。 我搜索了网页,发现在this link中有一个模块azure(npm install azure) 。 下面是代码片段我在应用程序中使用 var azure = require("azure"); var blobService = azure.createBlobService