codinginflow/MERN-course

improve existing readme

Opened this issue · 3 comments

Hi! I was watching the course and ended up going to the repo when something didn't work, I saw that the main README doesn't have too much information, since I was taking notes in every part of the course (a short summary about what I was doing), can I help improving the existing readme and add some information about the parts of the course?

I was thinking in two main things, one that could be a course part section with a brief description of what is done in that part, and the second could be a useful links section, since I had knowledge of frontend and backend most of the things that were explained in the course make sense, but I know that you can follow the tutorial without having a strong foundation in things like React, Express, or so. And some links to MDN (for example about the Routes, Model, Controllers part), to the new documentation of React, to the documentation for the NPM modules used in the course, etc. could be useful.

About the descriptions could be something like this:

#6 Express HTTP Error handling

In this section, we are going to install the http-errors package that will allow us to improve the error handling in express by creating different errors with different status code that will show the user more information about it instead of the default errors.

if (!mongoose.isValidObjectId(noteId)){
            throw createHttpError(400, 'This ID is not valid')
        }

        const note = await NoteModel.findById(noteId).exec();

        if (!note) {
            throw createHttpError(404, "Note not found");
        }

We can do that. But the written content has to be correct, properly formatted and spelled correctly (that's not always the case in the snippet above).
If you wanna do that, go ahead!