compoundjs

    0熱度

    2回答

    我正在爲我的應用程序使用CompoundJS,現在嘗試實現一個腳本,它將 將圖像從複合j上傳到azure blob。 我搜索了網頁,發現在this link中有一個模塊azure(npm install azure) 。 下面是代碼片段我在應用程序中使用 var azure = require("azure"); var blobService = azure.createBlobService

    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?沒有適當的文件來這樣做。 我只想處理不可用的控制器操作。我無法做到。 在此先感謝。