[英]Cannot read properties of null (reading 'password')
我正在嘗試使用 express js 和 MongoDB 構建用戶登錄系統,但問題是每當我嘗試使用正確的用戶名和密碼以用戶身份登錄時,它都可以正常工作,但如果我使用任何錯誤用戶名,它給了我一個錯誤。 僅當用戶名錯誤或用戶名和密碼都錯誤時才會出現此錯誤,但密碼錯誤時不會出現此錯誤。 這是我的用戶登錄 ...
[英]Cannot read properties of null (reading 'password')
我正在嘗試使用 express js 和 MongoDB 構建用戶登錄系統,但問題是每當我嘗試使用正確的用戶名和密碼以用戶身份登錄時,它都可以正常工作,但如果我使用任何錯誤用戶名,它給了我一個錯誤。 僅當用戶名錯誤或用戶名和密碼都錯誤時才會出現此錯誤,但密碼錯誤時不會出現此錯誤。 這是我的用戶登錄 ...
[英]Create Mongo DB database dynamically in authentication mode with Mongo Client
我有一個應用程序,客戶在 UI 中創建公司。 對於每家公司,我都需要在 NodeJS 中使用 MongoClient 以身份驗證模式創建數據庫。 ...
[英]ResponseError: Forbidden
當我嘗試運行node src/emails/account.js時,這個問題在我的終端中顯示,除此之外我還驗證了單個發件人請求: ...
[英]Node js and mysql return query result
嗨,我剛開始學習 nodejs 和連接的 mysql 數據庫,現在我想將選擇查詢的結果保存在某種類型的變量中,但我不能。 當我執行上面的代碼並調試它時...... select 語句從數據庫中返回 3 條記錄......但是當我將它們推入數組......並打印數組時什么也沒有發生......請幫 ...
[英]User.findOne() function not returning from call to database
我正在編寫節點應用程序的注冊用戶功能。 我打電話來連接到mongodb數據庫。 但是,當我使用User.findOne({ email: req.body.email })函數搜索數據庫時,我的函數陷入了這一步。 我使用postmate發送請求,並且能夠console.log()請求正文 ...
[英]TypeError: expect(…).toBeA is not a function
這是我的 message.test.js 文件。 錯誤:priya@priya-pro:~/node-chat-app$ npm test node-chat-app@1.0.0 test /home/priya/node-chat-app mocha server/**/*.test. ...
[英]Can't we use oracle12c instead of mysql in node.js
我使用了 Oracle 12c 而不是 mysql。 但我收到“錯誤:連接 ECONNREFUSED 127.0.0.1:3306”如何解決此錯誤? ...
[英]Why clearInterval doesn't work on a function
這是代碼 為什么 clearinterval 不會阻止 setInterval 的執行? ...
[英]WebSocket Headers in NodeRED on IBM bluemix
我知道 WebSocket api 沒有定義標頭。 據此,我們可以使用 URL 設置基本身份驗證。 ws = new WebSocket("ws://username:password@example.com/service") 在 NodeRED(WebSocket IN 節點 ...
[英]Integration of `connect` on Node.Js failed
Node.Js上的connect集成失敗,節點js出現問題。 該腳本無法將其連接到api 。 在瀏覽器上顯示 不能獲取 / 這是教程, 請點擊這里 var express = require('express') var jwt = require('jso ...
[英]Trying to scrape movie contents from IMDB using Node.js dynamic routes . but getting undefined in my output.json file?
實際上,我正在嘗試使用 node 從 ImDb 中抓取任何電影,但是在我發出請求但在我的 output.JSON 文件(電影評級和評論應該出現的地方)中得到 undefined 之后。 首先,我向http://www.imdb.com/find?q= 'movie' 發出請求,其中電影應該是動態的 ...
[英]include mongoose models into single js which is include in node.js file?
我正在使用 mongo mongoose 創建節點應用程序。我有模型單獨的文件,其中創建了所有數據模塊,我想將所有數據模型配置為一個 js 文件,我們必須將其包含在 node.js 文件(server.js)中有 user.js 書籍.js 現在我想將這些 books.js 和 user.j ...
[英]require('use-strict') doesn't work for me
在這里,我正在嘗試為只讀屬性設置值,但沒有收到任何錯誤: 這是我的代碼: ...
[英]Security framework for Node.js web application
我的Web應用程序使用Connect中間件。 我想知道是否有一些像Spring Security或OWASP ESAPI一樣的Node.js Web應用程序安全框架? ...
[英]Real time chat between users like in social network [Laravel + Node + Redis]
我需要想法如何以安全的方式使2個用戶之間發出和訂閱消息。 例如: user1發射message1信道: user1-2 user2訂閱通道user1-2和recive message1 如何確定user3不會攔截user1和user2之間的聊天? 如何確定user3不會訂閱頻道us ...
[英]How do I receive a json object and files in a multiparty form?
我正在嘗試構建一個發布用戶名、密碼和個人資料圖片的 angularJS 頁面。 我正在使用自定義 fileUpload 指令,然后將字段和文件作為多部分表單請求發送。 在服務器端,我可以使用多方獲取文件,但字段數據顯示為 {[object object]} 並且我無法訪問它。 試過 JSON.st ...
[英]how do we encode each byte as two hexadecimal characters in ruby?
我有一個十六進制數字 在node.js中,我們有一個new Buffer(hexMidAppId, 'hex')的庫new Buffer(hexMidAppId, 'hex') ,它為我提供了輸出 現在相同的輸出,我想在ruby中獲取它,但是我在Ruby中找不到Buffer方法的 ...
[英]Receiving Caught exception: Error: listen EACCES while running gulp
我在我的項目中使用gulp。 我想通過gulp任務啟動node服務器。 這是我的gulpfile.js : 我的節點端口號是80 。 我正在Ubuntu服務器中運行以下代碼: 有什么想法嗎? ...
[英]Why doesn't my connect middleware pass forward?
我正在使用"connect": "^3.3.5" ,我有app.use '/', messageMiddleware.incoming, userMiddleware.process 我的messageMiddleware具有: 我的userMiddleware有 但是,它 ...