Skip to content

Conversation

danu38
Copy link

@danu38 danu38 commented Aug 12, 2025

Copy link

@JennieDalgren JennieDalgren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello!

In your frontend I can't login. And there is no way to register. This way I cannot test your project end to end.

image

Please ping me when you have fixed this.

Keep it up! 🌼

@LindaSchonfeldt
Copy link

Really good job, Danushka! I really like how explanatory your comments are. Makes it easy to understand your code and overall it looks really good! 🙂 The only things I can comment on are:

Your architecture:
To make the code more easy to follow and update you could break out a lot of stuff from your server.js. For example, you could follow the MVC (Model–View–Controller) architecture. I’m sure you’ve heard about it. 🙂 Following that architecture you could put your mongoose models in a folder called “models”, your request handling in a folder called “controllers” and your routes in a “routes” folder. This way, server.js is clean (just setup + wiring), while logic and data handling live in their own files.

bild

Route order:
I also read something about organizing your more specific routes first, and your generic /:id routes last inside each route file. This, because the order matters in Express. If you have a dynamic route like /:id, it can accidentally “catch” other requests if placed above more specific routes. So I guess that’s another reason it’s better to separate the routes into different files.

One again, great job!

@danu38 danu38 requested a review from JennieDalgren September 4, 2025 13:39
@danu38
Copy link
Author

danu38 commented Sep 4, 2025

Hi @JennieDalgren , Login issue fixed now can you review this when you have time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants