Hellooooo I am back with another post, this time talking about more projects that I have completed filling my knowledge gaps and also making me more excited to start others.
Like I wrote in my previous post, I was trying to deploy my last project on Heroku Exercise-Tracker but I was stacked because I was trying to understand how to upload and environmental variable and I find out that was extremely easy and so if you go now in my portfolio/projects page you will find the project there.
Now deploying the backed on this projects was a bit of a pain because I was not understanding why even though the build was successful on Heroku there was an error, so I had to look on google for a solution, the error was Cannot get/
and the reason why was because I had not default route in my server so it was looking for a page to show live and obviously there was not page because there was not route, but after find out that I create the route and Heroku gave me another error Not Found
, so again I looked on google and the answer was the same, the server was not able to found my index.html
to load live, The solution That I found was to use the Path Module
and with __dirname
create the path for the server to find the Index.html,
ok good , done that Heroku presented me with a different error Internal Server Error
, at that point I was screaming because I spent 2 days trying to solve the issues and I had just errors coming up.
Anyway end of the story after 4 days of debugging I asked myself why I was trying to show live the app on Heroku if the front end was already deployed on Netlify and that's when I realised that I was an "idiot" so the only solution at that problem was just creating a default route with "/"
and use res.send
and not res.sendFile,
done that the server was up and running with no errors, but the good thing in all this was that I deep dig on google for a solution and I learnt how to read the logs understand the errors and look for a specific solution.
Now the app is running with no issues, after solved it I felt great, after 4/5 days of searching I was finally able to make it work.
After the Exercise-Tracker I moved on the next Project by Traversy Media The Expense-Tracker, another project with the MERN Stack quite similar to another project that I have on my portfolio The Budget Calculator but different because is more structured, use a database with a node server and context Api to manage the internal state of the app, so like I said Similar but not.
The big take away from these 2 projects experience is the learning how to create a server, create routes, managing a database , connecting the database to the server and the server to the client side, structure the projects in a way that it's easy to understand and also very organised.
After these 2 I will move on the next one, that I am not sure yet which one to go with first, but before that I want to dig a bit more on the MongoDB Node and RestFull api, more like a theory learning.
Good I think that all these projects that I am doing and I have done in the past are making me more confident and ready to look finally for a job, applying for a junior developer should not be too hard cause I guess at the moment I am learning more advanced stuff so in theory I could possibly find something but who know we shall see.
That's it for now, My journey continue, I'll talk to you in the next post.
Stay safe.
Hi my name is Michele I live in Western Australia and I am the creator of this blog, made it to improve my coding and writing skills.
Created by Michele Merola all copyright reserved 2020