All Questions
8,688
questions
0
votes
0
answers
6
views
Axios Post Still Blocked Even Though "Access-Control-Allow-Origin", "*" Set On server
In my backend I've set the following endpoint
router.post("/sign-in", async (req, res) => {
try {
//Extracting email and password from the req.body object
const { email, ...
-2
votes
0
answers
21
views
Why res.clearCookie() is not working after deploying to vercel?
First of all, everything works fine when running on localhost.
However, after deploying the app to Vercel when the user tries to log out it should clear cookies with res.clearCookie() but it doesn't ...
1
vote
0
answers
21
views
Having trouble sending an image from Express to React client
In express, I'm using the google places api to get city images. I'm having trouble sending the response to my react client.
here's my express route:
router.get('/', async (req, res) => {
const { ...
0
votes
0
answers
14
views
How can I fix react hooks in a React SSR project?
I try to migrate an existing project in js using express and ejs to render templates. I used react and react-dom. But the issues are that hooks and onChange don't work. I'm going to share the client ...
0
votes
0
answers
29
views
How to properly package a Node.js and React app stripping the container of all unneeded files?
I have a Node.js backend that serves up the React frontend (later I can do CDN probably) and for now, I plan on disallowing CORS so React must talk to my Node.js backend only. The prototype for this ...
0
votes
1
answer
37
views
Getting 404 AxiosError: Request failed with status code 404
Could you please help me to solve the problem with the routes.
In result I have the next code:
// server/index.js
// server/index.js
const express = require('express');
const bodyParser = require('...
-2
votes
0
answers
17
views
How to do client generation and scaffolding generation [closed]
On my previous project, every client microservice used an API interface to talk to another microservice. The client was generated for all microservices. The generated client translated the DTO request ...
0
votes
0
answers
22
views
Delayed and incorrect updates from react context to backend
I am creating a food ordering application as project. Here, user can add items from a single restaurant only. If they tried adding items from another restaurant too, they will be shown an alert ...
0
votes
0
answers
24
views
How can I import CSS modules from my Node server?
I have an Express server that renders React components to a string:
server.get('/', (req, res) => {
res.end(renderToStaticMarkup(<App />));
});
It works as long as App doesn't import CSS ...
-3
votes
0
answers
19
views
How do i fetch data and display in MERN? [closed]
What are the steps to be followed? What are the packages that need to be installed? I am also willing to share my codes if needed.
I tried using Axios and Cors.
This is my JSX code.
import { useEffect,...
0
votes
0
answers
5
views
How to host a express js backend in vercel,i am getting error 404
I am trying to host an express js backend api on vercel
Here its my project structure for the backend folder . I am trying to host the backend folder
everytime it says me 404 error not found
This is ...
1
vote
0
answers
31
views
Post form data inside an array of objects
Hello I've been working in a blog to post blogs, you can add images too
For add image system i use Multer and Path.
To save the image, I save it in a FormData, with its key, so Multer can read the ...
-1
votes
0
answers
25
views
When configuring the proxy, the error 426 (Upgrade Required) appears, Node Express React [closed]
426Error
App page
package.json
server.js
running5000
httprequest
directly fetch http://localhost:5000/api/products
I can confirm that I can get data from http://localhost:5000/api/products, but in ...
-2
votes
0
answers
8
views
How to Create Separate MongoDB Databases for Each Admin User and Manage Connection Strings in a MERN Stack Application [closed]
I am currently working on an inventory management system using the MERN stack (MongoDB, Express.js, React.js, Node.js). I have a requirement to create a separate MongoDB database for each admin user ...
-1
votes
0
answers
26
views
admin and user interferences [closed]
please I'm working on ecomerce website (for my portfolio ) and I'm confused to keep admin , user interfaces in one project (website )or separate them . I'm using react js , express js and mysql .I'm ...