DEV Community

Nicolas-Leveque
Nicolas-Leveque

Posted on

First week

I tought I'd make a post about the first few day of my new round of 100 days of code.
As I mentionned previously, for the past few week I didn't code so much, I've been focusing on finding work after I left Amazon and to find a first job in tech is in itself a full time job.

For the past week I've been reworking a project I did during my bootcamp on OpenClassrooms: a corporate social network, it is a full stack project with back-end in NodeJS, Database in MySQL and front-end in React.

Why rework this project? the project and bootcamp are over. Well for one thing, it was a fun project and I really liked working on it, secondly I believe I can make it better and lastly, if I can deploy the damn thing, it could be a good example of my work.

To pass from MySQL to Postgres was not painless but not very complicated. In fact, the harder thing I did this was connect my API to the database! other than that, modifying the models was easy and the relationships between tables were unchanged.
I took the opportunity to improve the code I wrote months ago, and I realised how those changes would impact the front-end: some request wont need an userId sent for example, they will use req.user.id instead ( don't know why I didn't do this in the first place ) other send the format the data differently, I 'll have to take note of that for later.
I also changed my GET requests on the posts table: I used to send raw SQL requests instead of using sequelize. I did it for two reasons: I wanted to have more controls of the data, I wanted to choose which columns were sent to minimise network traffic, and to show the teacher that I knew at least a litttle SQL. I know, weird flex...
Anyways, I decided to use the sequelize syntax this time around and it is a lot nicer to use and the data send back is neatly formatted, I can't wait to use it on the front-end.

All in all this was a good week, I had fun working on code again!

Top comments (0)