Relative Content

Tag Archive for reactjsnode.jsexpressmongoose

im currently building my first full stack e-commerce website using react, node.js/express and mongoose

im currently building my first full stack e-commerce website using react, node.js/express and mongoose with guidance from chat gpt. I have been dealing with an error that I cant figure out. Im getting POST 404(not found) when i try to submit the signup form, and a similar error when loading my shopping cart but its a GET error 404.1 also noticed that for some reason the jwt token isnt being stored in the local storage. Im new to this, so im just looking for tips and advice on how to solve this please. Thank you!

Getting ERR_CONNECTION_REFUSED in React and Node.js Application

I keep getting errors ShoppingCart.js:16  GET http://localhost:5001/api/cart net::ERR_CONNECTION_REFUSED and signup.js:71 POST http://localhost:5001/api/users/register net::ERR_CONNECTION_REFUSED. Im unsure what the issue is. I spent hours doing reasarch but I cant find the solution. It gives me the same type of error when i signup aswell so I assume its one big mistake i made thats affecting it all. The […]

SyntaxError: Unexpected token ‘<', "<!doctype "… is not valid JSON edit

const cors = require(‘cors’); app.use(cors());app.use(express.json()) fetch does not work backend using the MVC pattern (NodeJs and Mongoose). frontend use React (vite) const http = require(‘http’); const server = http.createServer((req, res) => { res.writeHead(200, { ‘Content-Type’: ‘application/json’ }); res.end(JSON.stringify()); }) reactjs node.js express mongoose New contributor Yasiru Viyara is a new contributor to this site. Take […]