I’ve updated my portfolio app ‘Stock Trade App’ which is built using Expressjs for the backend and Reactjs for frontend. I’ve changed the Postgresql database in the first version for Mongodb in the current version. I just want to try mongoose package and see how it goes. It’s pretty simple, I like it.
So the structure of the API now is more focus to resources and organize them: users, holdings and symbols. And I have files for models and controllers, of course for routes and testing those routes. I have one more for validate the users and for errors.
Here you can see that structure for User.