Skip to content

Conversation

@Idahel
Copy link

@Idahel Idahel commented Jun 18, 2025

@VariaSlu
Copy link

Hey, Ida :)
I checked out your backend, it looks beautiful! You’ve covered authentication, CRUD for thoughts, and even added nice extras like filtering, sorting, and pagination. The code is clear and well-structured, which makes it easy to follow. One small idea would be to split out routes and auth into separate files to keep things even more organized (I've got this tip from Jonny).
Since you already use bcrypt, you might switch the sync methods to async so the server doesn’t block. For example:
const salt = await bcrypt.genSalt(10); const hashedPassword = await bcrypt.hash(password, salt);
I use the synchronous methods as you do. I've learned recently that it works fine for small projects, but Sync methods block the event loop (meaning that while one password is hashing, no other request can be processed).

I found your code clear. Great job!

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.

Really good job with this project!

You have nailed all requirements and stretch goals as well. You are approved with VG

Next step would be to refactor and break up the code into smaller chunks rather than having everything in the server.s file.

Looking forward to see you final project!

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