My back-end journey
Introduction
When I was creating blog API, I encountered some challenges which I later found a solution to it. I am a JavaScript developer using node.js as my framework, and MongoDB as my database. Then, as required by the application's design, I implemented API authentication, making sure that a user must be verified before he/she posts a blog.
When I was testing my API I ran into so many issues, one of the issues was when I registered a user and wanted to log in and it showed an error saying Could not get any response.
Step by step on how I solved the problem
first, I made sure that the passport JWT that registers a user is logged in is accurately and correctly generated in the login process
secondly, I went on to remove the authorize from the endpoint to ensure that the user could still access the endpoint without it
thirdly, make sure that authentication and authorization are correctly configured in the signup middleware.
However, the problem was unable to resolve, after several debugging, I called on a mentor to help me and look into my code. He called on a Google Meet call and behold it was case sensitive issue, in the login middleware. I used camelCase in my schema while I was using snake case in my login authentication middleware and my login controller.
In conclusion, bugs are not a bad thing but rather it helps us to understand more about how code works and to make us learn more.
Myself
My name is Chinecherem Augustina Ugwuanyi, a tech enthusiast, and back-end developer looking forward to gaining more experience. I started learning node.js in the year 2022, I have built many servers that have already been deployed in render hosting, and I also have one deployed in cyclic hosting.
Why I joined the HNG internship
I joined the HNG internship because I want to gain work experience as a node.js developer, and also want more challenges including fixing bugs.
.
Subscribe to my newsletter
Read articles from Chinecherem Ugwuanyi directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Chinecherem Ugwuanyi
Chinecherem Ugwuanyi
I am a backend and mobile developer, I study computer science at National Open University, and I am currently doing my diploma in software engineering at AltSchool Africa. I am a tech enthusiast.