I'm building an API for my web app and I was able to successfully send requests to the routes in Post.js when they only had url params. But when I try to create
When sending a get request to api, I get an error: has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource
I am creating an API with express.js for a food app and I can't figure out what is the best (most efficient) way to query the data and send it
I'm having an issue with the routes in my project called review. My other routes have no issue so I'm not sure where I went wrong here. I keep getting error 404
I'm trying to setup connect-flash for my nodejs express application. I'd like for a message to be flashed when a user goes to certain pages. I'm using ES6 packa
for example : i want users to enter http://localhost:5000/ANY_FILE_NAME?height=200?width=200 in URL bar how can i build the URL to receive the
I already have a wordpress website. I studied web development using js, node.js, express and mongodb and build some projects. I would like to add it to my websi
server: const { ApolloServer, gql } = require("apollo-server-express"); const express = require("express"); const mongoose = require("mongoose"); const { userRe
Let's assume I have an endpoint /print. Whenever a request is made to this endpoint, it executes a function printSomething(). While printSomething() is processi
I am trying to create a login page and sign up page, my app.js gives me this error, I think it is the last line of this code. I can send you the other component
And the app.js screenshot: I tried every possible combination of href and express.static(""); adresses. I either get a response from a browser saying browser
I've created a route called login and another one function(middleware), if the authentication is good, this can be redirected to the delete route but unfortunat
I have a REST API that was built with Node.js and Express.js. When making an API call, how can I view which portion of the code it uses? (without me having to i
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