I deployed my MERN app on heroku. However, I am only able to hit the login endpoint, the other api ednpoints are not working. I have tried changing the proxy address from my local server "http://127.0.0.1:1000" to my heroku's…
I deployed my MERN app on heroku it is working fine. However, the deployed app uses my local server. when I stop my local server, the deployed app stops working. What am I doing wrongly?
Here is my package.json file
{
"name": "careplan",
…
I am trying to verify a logged In user token in my MERN. However, I am getting "undefined" on client-side as API response.
When I hit the endpoint http://127.0.0.1:1000/api/v1/users/login in postman to login a user and this endpoint…
I have a context file and state file for Products. when I try to use that context in products component it is returning undefined values
productContext.js
import { createContext } from "react";
const ProductContext = createContext();
export…
I created logged in form wherein it will pop-out a toastify when logged in correctly. So my problem right now is I have a logic wherein the user can only access the website when his account is active, but my toastify is not popping correctly. I'm…
I am using JWT token for authentication in my MERN app. when i click on this endpoint "http://127.0.0.1:1000/api/v1/users/login" in postman to login a user and this endpoint "http://127.0.0.1:1000/api/v1/users/verify" to verify a user's token, the…
I am trying to send cookies through the backend interface, and when I test it with the Postman, it is done as required. The problem is that cookies are not being sent in the browser.
Here is my code:
server.js
import express from "express";
import…
When I use the postman backend it works fine. But when using React and trying to add data to the database gives a 400 error.
When I use the console.log(newpost) it gives a new post object on the console. But I can't send the data to the database.…
iam getting 3 errors in my console
1.Uncaught TypeError: Cannot read properties of null (reading 'useState')
2.The above error occurred in the component:
3.Get or create chat error TypeError: Cannot read properties of null (reading…
I'm trying to deploy an app created with the MERN stack on Heroku.
The structure of my app:
the port for the Back-end (Node.js server) is created in server.js:
const port = process.env.PORT || 80;
app.listen(port, () => console.log(`Server running…
I use the MERN stack and I want to create something like this on the frontend: http://localhost:3000/products?color=0000&sort=latest&category=man etc. I'm using the redux toolkit and my getProductSlice looks like this:
export const getProducts =…
Hi I'm using this tutorial https://github.com/bradtraversy/mern-tutorial
I guess it must have slipped past him, but after 7 days when the JWT expires, the website goes into an infinite loop telling me I'm not authorized. I set the JWT expiration to…
I'm creating a full stack MERN stack app, my front end is getting passed down the categories prop which is the model that i'm referencing to create a new Item, which is the model i'm trying to create on.
I'm getting a 400 error when I use the form…
Uncaught TypeError: Cannot read properties of null (reading 'imageLink')
The above error occurred in the component:
This Products page Display all the products in the database. When I click on any product card it will redirects…