Skip to content

Tag: node.js

Node.js – Decrypt an array of encrypted strings

A few days ago I went to the “Security and login” page of facebook. And I noticed that they store our devices so that we can control what devices are using our facebook accounts. And I thought “Maybe I can create something like this”. So I created a new Node.js env and started coding. …

How to get if a specific user is online?

I’ve got some code which should send in the current status of a user if they switched to online, but the problem is that it sends the message twice AND that I can’t check who the user who changed their status is. I just want it to check IF the user who changed their status is a person with a

MongoDB find by _id

I’m building a Node.JS app, and i have a function that returns all the records if none of the queries were sent and, if sent, it returns all the records satisfying my query. Here’s my code: Why i got an empty array returned when my param is { _id: ‘5f0218093e6f27870a6d5db2’ }? When I&#…

TypeError: Order.find is not a function

I am building ecommerce website using MERN stack. And I am getting error while testing using Postman. backend/controllers/user.js backend/models/Order.js backend/models/User.js backend/routes/user.js Error:- TypeError: Order.find is not a function at exports.userPurchaseList (C:UsersRahulMernBootcampprojbacke…

Nuxt.js fails to start up with auth module

npx create-nuxt-app client and set it up. Run npm run dev and everything works. I start auth setup with npm install @nuxtjs/auth add ‘@nuxtjs/auth’ module in nuxt.config.js add example auth strategy like so Add the example vue store and save it in store/index.js: I run npm run dev, everything comp…