Category "node.js"

Client-side jwt token storage

I need advice, what is the best way to store a JWT token? Should we store in cookies or storages? But with the CSRF flaw and xss attacks I have a doubt. I'm sti

why I can't get all folder's module with require('./folder')

i am using this: index.js functions └abc.js └reset.js functions.js functions.js const fs = require("fs") const functions_ = {} const files = fs.re

While deploy the MERN Stack at DigitalOcean error TextEncoder is not defined

My app works on development but gives Text Encoder error in production. When I run the Node index.js command, I get the error "TextEncoder is not defined". Erro

How do i solve this node.js error when im calling it with jQuery?

I have this assignment and I'm a bit stuck. When I press the button on the site the console I get this error: GET http://localhost:3000/getUser 404 (Not Found)

bybit api spot order create nodejs

I'm using bybit api to create an order on the spot market in nodejs. i tried the below code: var params = { api_key: api['key'], qty: 30, symbol: "E

How to click on the reCAPTCHA using webdriverio

Hi everyone can you help me with that problem? I'm trying to enter inside the iframe of google reCAPTCHA. Tried several ways to click but didn't work with the i

Yarn - How do I update each dependency in package.json to the latest version?

I have a react app with deprecated dependencies. To make it work, I have to update the dependencies to their newer (but stable) versions. As per this stakoverfl

webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case

im getting the errors: 22 errors have detailed information that is not shown. Failed to compile. webpack < 5 used to include polyfills for node.js core modul

Is there a way to avoid stringValue Favicon.ico error in express js

I am trying to build an application in my Express and anytime i navigate to the admin page i get this error const castError = new CastError();

Is it safe to store dates as a string in mysql?

I have to allow my users to make an update with 24 hours of delay from their previous update, so because date operations in this case are going to be on the bac

Making group video call application wrtc vs mediasoup

I am making a group video call nodejs application. I come to know about two npm packages wrtc - from this video https://www.youtube.com/watch?v=GMbdEnK8h3U medi

KoaJs cant handle POST requests on CloudFunctions

I have a NodeJS Application written in KoaJS, app.ts const app = new Koa(); app.use(healthCheck()); app.use(bodyParser()); app.use(errorHandler()); app.use(end

Strapi API cannot retrieve data

i have collection in strapi named movie, in there i have 24 data. but after retrieve movie data via API, i just get 0 rows data, im sure the endpoint status is

Docker container does not respond to http request

I'm trying to send an http request through axios, from my localhost (node server) to a docker container (which contains a simple server in node too) which belon

passport.authenticate() isn't redirecting

I have a problem with passport middleware, when I am authenticating a user it doesn't redirect I have no idea what's wrong. Here is the code and whole project o

How to integrate Google Home CameraStream with AWS kinesis video streaming?

We have a home camera device which is using aws kinesis video streaming for webrtc. We were trying to integrate google home to enable command based live stramin

How to delete and insert with a single command in mongoDB?

So, I have a collection like this: [{ "name":String, "address":String, "hobby":Array of Strings }...] Every hour I query an API and get the response l

Storing sessions with express-session, connect-mongo, and mongoose

I am looking for guidance on setting up session based authentication with with Express-Session, connect-mongo, and Mongoose. Currently it's just generating a ne

.then running before data is returned from fetch

I want show_name() to run and then call another function. I don't understand why show_name().then fails. I'm probably overlooking something. async

How to automatically restart a node.js script daily using nodemon?

I'm using nodemon to manage a node.js process, and I would that process to auto-restart every 24h. Is there an elegant solution for this? I could also just crea