This is a code repository for the corresponding video tutorial. Using React, Node.js, Express & MongoDB you'll learn how to build a Full Stack MERN Application - from start to finish. The App is called "Memories" and it is a simple social media app that allows users to post interesting events that happened in their lives.
See if you are following the video and are stuck on the step where you fetch the posts from the database but only see a circular loader going on and on, then this is because there are some steps missing from the video (maybe adrian forget to add them).
Now follow these steps:
go to controller in server and paste this:
`//updated code
import PostMessage from '../models/postMessage.js';
export const getPosts = async (req, res) => {
try{
const postMessages = await PostMessage.find();
}
//end`
this should fix your errors and if you are having a network connection error just to mongo atlas -> network access -> add ip address -> check the box to allow fetch from anywhere and save OR just type this 0.0.0.0 ip address and you are good to go.
See if you are following the video and are stuck on the step where you fetch the posts from the database but only see a circular loader going on and on, then this is because there are some steps missing from the video (maybe adrian forget to add them). Now follow these steps: go to controller in server and paste this: `//updated code import PostMessage from '../models/postMessage.js'; export const getPosts = async (req, res) => { try{ const postMessages = await PostMessage.find();
} export const createPost = async (req, res) => { const { title, message, selectedFile, creator, tags } = req.body;
} //end` this should fix your errors and if you are having a network connection error just to mongo atlas -> network access -> add ip address -> check the box to allow fetch from anywhere and save OR just type this 0.0.0.0 ip address and you are good to go.