http server using go with boot.dev
Ohhh, finally finished the HTTP Server course on Boot.dev.
it took a good amount of time, and I enjoyed it. it was a hard mission, but worth every second.
this course came after a lot of studying of separate things, from Go to SQL to HTTP clients, and finally all those puzzle pieces started coming together in the HTTP Server course with Go.
i want to start by talking about Go. it took me a long time to learn Go, and it took a little bit longer because i was used to the C family of languages. then Go comes in and introduces a different way of thinking about things, from goroutines and concurrency to arrays, structs, and the overall workflow of writing programs.
and what makes Go really special for me is the community, the amazing tools that come with it, and the fact that you can build a lot without needing a framework to do everything for you.
after the Go course there was a feeling inside me, and honestly it was the truth: i really didn’t know the language . if someone asked me to do something with Go, i would probably panic (there is a double meaning here) and wouldn’t do it correctly.
i needed some kind of project or any real interaction with Go to fill that gap, so i started the HTTP Client course on Boot.dev. the main focus of it was to make me more familiar with requests, how to deal with JSON, and how to encode and decode a request body.
all of that made my hands a little dirty with Go, but after that came the big boss, the HTTP Server course.
i remember when i started it, the first assignment was marked as level 3 difficulty, and honestly it felt like level 10 or something.
but this is actually what made the course really special to me. the way of teaching was different. it basically said: okay, you should already know Go, SQL, HTTP clients, and the other pieces, so now let’s actually use them. let’s build this, let’s build that, and when there is a new concept, we don’t spend the whole course holding your hand. we read a brief introduction, go search for it, understand how it works, figure out how to implement it, and then actually use it.
they also introduced tools like Goose and SQLC. first you learn what these tools are and how to use them, and then you actually use them in the project.
now lets talk about the project of this course (chirpy)
it is a Twitter-like API, with users and chirps (tweets), and their CRUD operations, from creating and reading to updating and deleting.
i also implemented authentication and authorization, JWT access tokens, refresh tokens for getting new access tokens, and token revocation, and health and metrics for admins ,and added webhooks to handle events from an external service.
and if you are a frontend developer and want to build something on top of chirpy, feel free to take the API and build a frontend for it. if you need anything from me or want to work together on it, just contact me.