I have a website on MERN STACK in which I have Stripe implemented, the problem is when I try to pay through Stripe on a desktop/PC it works fine but when I try the same thing on a browser using mobile it redirects me to Stripe website and says an…
I want to create an admin user in my MERN application, I created a user model on back-end and put isAdmin there. Now I want to protect some routes on back-end. On front-end I need to protect normal user to access admin panel, which is accessible…
im trying to deploy a simple MERN app with a Vercel front end and Railway back end, working perfectlly in localhost,
so far the backend part seems ok, it works as expected with MongoDB and Postman.
The problem im facing is that whenever I make a…
I have put the images folder inside the views folder and added the relative path to the images but the images are not loading on the html page. I have tried multiple options like putting the folder outside views, giving absolute path but nothing…
How can I get the total price of specific item, I'm trying to multiply the quantity and the price and then POST it, but I'm having a hard time on how can I save the total amount of specific item
OrderSchema.js
const OrderSchema = new…
I am doing a mern project but at begin I got an error .
const express=require("express");
const mongoose= require("mongoose");
const app=express();
const dotenv=require("dotenv")
dotenv.config()
//connect router
const…
i was making an api but i got here an error
the error:
const err = new MongooseError(message);
full error:
MongooseError: Operation `users.insertOne()` buffering timed out after 10000ms
at Timeout.…
I'm new to MERN development. I'm trying to build a learning management system by following an old tutorial. But I ended up getting this error:
C:\Users\MRPla\Downloads\CourseGuccho\edemy\server\controllers\instructor.js:1
Error [ERR_REQUIRE_ESM]:…
I've tried it with Postman too and it does the same thing. I was following a tutorial and ran into this problem, which the creator didn't have. I copied and pasted (After error) his same working folder and the same thing:
It works with JSON:
But it…
I have added one feature around 1 month ago, which show progress of uploading file that time axios onUploadProgress is totally working fine, but now its not even get called when I am uploading file
code:
…
I am trying to create MERN stack app with the function creating job posts with json data (company name, position etc) and the image (company logo).
I use multer and cloudinary to upload and save image, and mongo db to save file path. I cannot send…
I want to modify Mongoose schema for order management system. How to update my schema which can be make possible to order multiple foods for same customer(from one post request).
ex - customer1 wants to order -
2 Fried-rice and 1 pizza`
`const…
Testing an e-commerce website, it's MERN stack when I run npm run develop chrome opens the page on localhost but I'm unable to click anything on it.
I open Microsoft Edge go in the localhost the application works properly, can add to cart, go into…