So this week I started on making my portfolio starting with the backend. When I get this done I'll ideally have a nice portfolio website that can act a sort of CV that also displays my skills as a developer.
So I the week by getting my repo set up. I then set up Jest to test my API which I was familiar with thanks to doing the todo API project. I also added my first function and test for creating a project.
On Tuesday I started working on the return of the function making sure it was returning the right status code and that it was returning the JSON. I also had to add the jest config file so I could set the test environment.
I started connecting to the database on Wednesday. I also continued working on the create project function moving on to error handling and integration tests finishing that function.
On Thursday I moved onto the get projects function for retrieving all the projects int the database. I got it set up and returning the correct response codes and returning JSON.
Friday I got through the rest of the get projects function adding error handling and doing the integration tests. I then moved onto getting a single project by the id making it return the correct response codes and the JSON as well as adding a try/catch block for acting errors.
Overall it was a good week I got the backend started and a lot of the other functions will be quite similar so I can get through them quite quickly. I'm happy to get started on my portfolio because it'll be nice to display all my projects in a more interactive way.