Questions tagged [nodejs-server]

405 questions
0
votes
0 answers

Why do I get a ECONNREFUSED ::1:27017 error when I start my node server?

When I run my project i got the error.I just learning mongoDB database with nodejs and Express. POST /submit 200 272.371 ms - 14 GET /submit 404 454.789 ms - 1595 /home/rifan/ExpressSample/node_modules/mongodb/lib/sdam/topology.js:278 …
Rifan
  • 1
  • 1
0
votes
1 answer

MongooseError: Operation `employees.deleteMany()` buffering timed out after 10000ms

I have been battlling with this mongoose error: MongooseError: Operation employees.deleteMany() buffering timed out after 10000ms. Pleae can someone help me out here. . I tried to seed my data to the mongoDB database, but keep getting the buffering…
0
votes
0 answers

Why I am unable to access express js service through different or specific ip address

This is my backend code. var port = normalizePort(process.env.PORT || '3009'); app.set('port', port); var server = http.createServer(app); const ip ='198.168.0.132' server.listen(port, ip ,()=>{ console.log(`Server running on…
0
votes
0 answers

Hosting nodejs server on Cpanel vps

i tried using this tutorial to deploy my server on cpanel vps hosting https://blog.cpanel.com/how-to-host-a-node-js-application-with-cpanel/ i performed each and every steps as told by them and tried to deploy the same file they did. it worked…
0
votes
0 answers

Better way to render a .hbs page with a message

I'm creating this web application using Nodejs,hbs, Express and Mysql. So I have implemented a form and set the form action to '/auth/addawish' where it will go through an authentication by not allowing everyone to add a new entry addawish.hbs…
AVI
  • 5,516
  • 5
  • 29
  • 38
0
votes
1 answer

How to get the CSS selector of a specific element in a website for my bot on NodeJS?

I am trying to get an element so that the discord bot picks it up and sends it on the discord channel. It currently picks nothing. I am not getting any error though. else if (tokens[0] === '!gtatime'){ const response = await…
0
votes
1 answer

EACCES permission denied

I was trying to host a server and listening to port 80 using NodeJS I was trying to run this code And This was the output I am getting I also checked this whether the port was already listening to something, can this be the reason? If yes then how…
0
votes
0 answers

WebSocket JavaScript doenst work on HTML File

My websocket only works in php language, i need to create in javascript(nodejs), he dont works. My PHP Code(Works perfectly): server.php
0
votes
0 answers

execute Refresh Token with multer

I use axios to refreshToken of Application, I do Task: Refresh-Token with axiosInstance.interceptors.response, at expiration time callback error will handle and return axiosInstance(originalConfig); if (error.response.status === UNAUTHORIZED &&…
0
votes
0 answers

Saving and authenticating multiple form data with passport js

I recently learnt authentication with node and passport js, but the truth is I only understand it when it's the email and password. But what if you're trying to register a user with multiple input, it feels as if there's no way you can do that. I've…
0
votes
1 answer

should i hace separate controller for different http requests in REST API

So we are trying to build a website and we have different routes but they have somewhat same functioning So say: for recomended products localhost:3000/products/veg/rec localhost:3000/products/fruits/rec for viewing all products…
Aditya
  • 1
  • 2
0
votes
1 answer

Importing from typescript file

I'm trying to import an object from a typescript to another typescript file. Here's my code: import mongoose from "mongoose"; import Note from './models/notes'; import User from './models/users'; import express, { Request, Response } from…
Alexxino
  • 557
  • 2
  • 16
0
votes
1 answer

Updating documents on MongoDB suddenly stopped working (error: 8000, codeName: 'AtlasError') -- NodeJS driver, web app

I've had a NodeJS backend web app running perfectly with reading/writing to my MongoDB cluster for the last several weeks. Today, I suddenly was getting errors when trying to update documents, yet I can still read/"find" documents without error. My…
amota
  • 141
  • 8
0
votes
1 answer

Use case of buffer in nodejs

How to fully use buffer in projects and system. how can you take advantage of buffer in creating your project. tried looking at the documentation and articles but it doesn't show any use case regarding buffer on live projects.
Jieyo
  • 5
  • 3
0
votes
0 answers

The File doesnt send

I was trying to upload an image but my file did't send, I did it with multer and it worked, but now that I am trying with Cloudinary, it doesnt work, Im new using cloudinary so I don't know if the error is related to it or not, or maybe I am using…