API & Microservice: Exercise Tracker Review

Just finished the Exercise Tracker project and was hoping to get a little feedback. Anything is much appreciated!

glitch: https://erratic-limit.glitch.me/

github repo: https://github.com/anthonyzamarro/fcc-exercise-tracker

I think you left your mlab credentials in your .env file that you put on github.

Thank you for catching that. I appreciate it.

Here is some feedback for you.

You might consider splitting up your code into an MVC pattern.

I had put all my code in the app.js file like you did but I was checking out the code from another FCC user for this project and he had it split nicely into the MVC pattern.

I had done this for some previous projects or tutorials and thought yeah, this is nice I should do what this guy did.

Here is his repository, you should check out how he structures his project.

I’m finishing up this project myself but I am using SQLite instead of mongo.

1 Like

@br3ntor Nice. I’m currently on this project using MongoDB & Mongoose. However, I’m thinking of starting over. I don’t plan on using MongoDB for future projects. I’m looking at Objection.js + SQLite. What ORM are you using in conjunction with SQLIte?

I’m just using https://www.npmjs.com/package/sqlite3 which is what glitch uses for one of it’s starting templates.

@br3ntor Awesome, thank you for the advice. I’ll take a look at that repo and apply the MVC pattern ASAP. I appreciate your help.

@br3ntor I just finished changing my code to include an MVC pattern (https://github.com/anthonyzamarro/fcc-exercise-tracker). Thanks a lot for suggesting that. It really keeps everything organized much better. Again, I really appreciate the guidance. All the best to you.

1 Like


Saw your code. One query, is there a way to filter the log: [workout] through mongoose query itself ?

You have retrived whole data of the user and filtered in NodeJS. Is there a way to directly do in mongoose query ?