-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
- Very professional README.md - Excellent
- Love your clean and minimalist design. If I had one criticism it is careful to not be too sparse. Information density is very important for web design.
- You can use {timestamps: true} to have mongoose handle createdAt and updatedAt for you automatically.
- "checklistId" is more conventionally just => "checklist". But either way :D
- Instead of "completed" as a boolean, make it "completedAt" and make it a datetime. Then you have both if it is completed and when in one piece of data.
- Careful with "todoItems", this should be => "todos" and be an array of Schema.type.ObjectId.
- Same for "OwnerUserId" => "owner" or even just "user" to be clearer.
- reminder to gitignore your node_modules
- You require bcrypt in your
app.jsbut don't use it. so you can just remove it. Only require things you use. YAGNI - I really like your code. So clean, and you use one-liners the same way I do.
- Review and use
const,var, andletconsistently and correctly. Lots of extravar's around. - Your controller code could be cleaner though, imo, put more on one line.
- If you fix your naming of your associated models you can use
populate()to clean up your queries in your controllers. - Where are your socket calls?
- If you use
.sort()make sure to chain it and then finish with a.then()like this:.find().sort().then().catch()
Main things are to clean up your naming of attributes, timestamps, and especially the naming of associated resources. I'd also like to see the sockets but couldn't find. Otherwise looking good.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels