app.js import express from "express"; import { getTokenData } from "./src/services/dbServices"; const app = express(); app.get("/api/toke
I'm not able to retrieve the data I'm sending from the client to the server. My react code is the following: axios.post('http://localhost:5000/post-entry', { da
I am trying to decrease the quantity, which I have to change on mongodb database, also I need to show it in body. I set a button called delivered which will de
My JavaScript application allows users to download a file. The page shows a clickable link to the file. The file is stored in MongoDB. When I click on the link
I have 2 mongodb documents shop and customer shop documents are like below { id: 1, zipcodes:[ '12345', '11111', ] } { id:2, zipcodes:[ '45678', ]
I want to test my routes with jest but I don't know how to mock or simulate a session in my test to pass the first if line 2 app.get('/getMailSuiviList', (req,
Started working on a new application and decided to write tests from very early stage to avoid any future mistakes. However, little bit struggling I guess with
I am trying to make an https request in my backend node.js web app. I have the following code: const express = require('express'); const https = require('https'
Error File structure Route app.get("/api/animation/:token_id", (req, res) => { const tokenId = req.params.token_id; const data = generateWorldData(); c
I use a REST client to test my app (Insomnia and postman). My app literally does nothing: const express = require('express'); const app = express(); const fileU
I want to include header.ejs and footer.ejs into order.ejs. The image below my folder structure. But, I've got error. The code related to include in order.ejs
I have a task where I am given a URL such as https://xyz.json. This URL prompts the downloading of the JSON file into the local. I am now required to read the u
so I have a schema where I want to add ObjectID to an array of id's in mongoose, I tried adding it unique, but did not work. Most likely because I need to itera
Hello I'm on a (ReactJs Node Mysql Express) stack, my website has an events tab which the admin could upload to it events. Each event has a cover photo, inner p
Hello I'm on a (ReactJs Node Mysql Express) stack, my website has an events tab which the admin could upload to it events. Each event has a cover photo, inner p
I am passing an object from server and I cannot see it pass functions. here is my code. const express = require('express'); const app = express(); const path =
I am building an API using express js. I have structured it so that each data model (e.g. user, organization, etc.) has their own modules as such: router - vali
Im making an API on nodejs with express and mysql. In the POST method i dont get any error but on mysql store al values as 0, like this: 1 0 0.00 0000-00-00 0
I wonder if there is a performance difference between below cases. nodejs oracledb lib - express server connection code - 1 query, 1 connection whenever I send
I'm relatively new to React, but facing an issue which I understand to be fairly common; my app works fine, but when I refresh or try to link directly to a rout