Questions tagged [nodejs-server]

405 questions
1
vote
1 answer

how to prevent NodeJS FS mdule from caching?

I'm making a file manager using NodeJS and EJS, I have a default /folders route which reads all files and folders in a specific location using fs.readdirSync(folderPath, { withFileTypes: true }); and another route /create-folder makes me a new…
1
vote
0 answers

Pass logged user into passportjs eveonline

I have look for the past few hours trying to find this solution. My objective: insert logged in account (reactjs front end) into database of saved account token/refresh token(passportjs eveonline) I have so far gotten passportjs to do the fancy…
1
vote
0 answers

understanding official documentation of socket middleware

under this section: https://socket.io/docs/v4/server-socket-instance/#socket-middlewares while trying to run the sample code in my local machine, the provided sample simply does not works. below are the code used for…
aii-yin
  • 39
  • 4
1
vote
1 answer

MongoServerSelectionError: connect ECONNREFUSED ::1:27017 Nodejs server not connecting to the Mongodb Database

I'm encountering a server selection error when attempting to connect to my MongoDB database using Node.js on my Windows system. Specifically, I am using MongoDB version 6.0.6 and Node.js version 18.16.0. Although data is being sent to the server and…
1
vote
2 answers

Redirect domain to IP with port using CloudFlare

I have a simple Nodejs server where one of my web projects is. It is a server that works with the npm express module. The project has an ip address that looks like this 1.1.1.1:25750 I have a web domain on CloudFlare (test.mydomain.org) and I want…
1
vote
1 answer

Vite SSR + Node.js native HTTP server?

Is it possible to create a Vite SSR app with Node.js native HTTP server? The guide from Vite documentation is using Express. But I prefer using Node.js native HTTP server as follows: const port = 3000 const host = 'localhost' const requestListener =…
Run
  • 54,938
  • 169
  • 450
  • 748
1
vote
1 answer

Nodejs API can’t be reached via linux server

I am using google cloud linux to deploy my nodejs app, I follow this tutorial video https://www.youtube.com/watch?v=qxoGv_vogdc, every steps going well without error. However when I enter API url like this IP:port/home, the url keep loading for a…
1
vote
0 answers

Unable to load schema from 'https://json.schemastore.org/package': getaddrinfo ENOTFOUND json.schemastore.org."

Unable to load schema from 'https://json.schemastore.org/package': getaddrinfo ENOTFOUND json.schemastore.org." Unable to load schema from 'https://json.schemastore.org/package': getaddrinfo ENOTFOUND json.schemastore.org."
Nana Kwame
  • 11
  • 1
1
vote
2 answers

How to populate reference stored in different collection?

I have a following monogodb collections coll1 coll2 -------- ------- _id _id name coll1_ids coll2 can have multiple reference to coll1 but coll1 will only have one reference I want to populate coll2 data in coll1. Is…
1
vote
0 answers

Create a Blob for Video in NodeJs18 and Use it on Client Side

Learning NodeJs and Blob, and I Try to Create a Blob from a Video File in NodeJS. And send this in a Json file to my Client. Data will be Fetch inside GetStaticProps in NextJS. Here is What I Created in NodeJS Server : const fileBuffer =…
Lucas
  • 85
  • 9
1
vote
1 answer

How to change file system permission on cyclic.sh?

Cyclic is a web hosting platform like Heroku I am trying to create a file on cyclic in my NodeJS API. But, it turns out that the folder permission is write-only. How do I change folder permission to enable file writes in cyclic.sh Here is the…
Artaza Sameen
  • 519
  • 1
  • 5
  • 13
1
vote
0 answers

AWS lambda throw an error occasionally when I invoke the lambda

Lately I have been getting an error that happens about once a week . maybe it is related to timeout of lambda or connection to monogoDB but I'm not sure. i using aws lambda and nodejs14 . That is the Error: 2022-12-19T14:30:40.715Z…
1
vote
0 answers

node.js ERR_IMPORT_ASSERTION_TYPE_MISSING TypeError: Module tsconfig.json needs an import assertion of type "json"

{ "extends": "../../tsconfig.json", "include": [ "**/*.ts" ], "exclude": [ "node_modules", "build" ], "compilerOptions": { "baseUrl": ".", "rootDir": ".", "outDir": "build/", …
Kok How Teh
  • 3,298
  • 6
  • 47
  • 85
1
vote
1 answer

Perform an action when Firebase Notification is not received by the device

I am trying to check if a function or method is being invoked in the server and act accordingly. I am creating a basic app that notifies people about their financial transactions. I am using Flutter for the app, NodeJS for the server side of things,…
1
vote
0 answers

This is a simple web chat application with nodejs and socket io

I can't solve the problem. Could you help with this link socket connection to the server? ? Code on Server side // const { Socket } = require('socket.io') // Node server const io=require('socket.io')(8000) const user={} // connection come //…