0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
click for more info
No active XP Potion
Accept a Quest
Login to submit answers
Or, as I like to call it, HTTP from TCP.
In this course, we'll build our own HTTP 1.1 server from scratch in Go.
HTTP/1.1
protocol. (Look, the RFC is long, but the main points are fairly straightforward). You'll understand from a high level what happens when you fetch("google.com")
.I still remember sitting in class, fall of 2007, as I watched my first data structure coded in Java. The magic I felt seeing a class reference itself...
class Node<T> {
public Node prev;
public Node next;
public T data;
...
}
In that moment, I knew I was a computer scientist through and through. This feeling reached a pinnacle when I had to create a video transfer protocol for a government robot.
I felt empowered. And the best part? It was all in C.
Were there security issues? Yep. Memory leaks? Probably. I wouldn't know. Did it successfully transfer video while the other teams struggled to get basic hardware components to even work? Yes. I felt like a wizard. And I want you to feel like a wizard too.
Welcome to TCP to HTTP.
Throughout this course, you'll be using the Boot.dev CLI to run our tests (which are just CLI commands) against your local environment. Install it now if you don't already have it. All the instructions and troubleshooting info are on the GitHub page.
Make sure the Boot.dev CLI install worked:
bootdev --version
If you're stuck, reach out in the help forums of the Discord.
Once the bootdev
command is working, log in and follow the instructions:
bootdev login
Once you have the CLI installed and you're logged in, copy and paste the run
command from the right into your terminal and execute it. If it's doing what you'd expect (printing bootdev cli is ready!
), then run the submit command.
The Boot.dev CLI requires you to be signed in to submit your solution!
Copy/paste one of the following commands into your terminal:
Run
bootdev run b0cebf37-7151-48db-ad8a-0f9399f94c58
Submit
bootdev run b0cebf37-7151-48db-ad8a-0f9399f94c58 -s
Run the CLI commands to test your solution.
Using the Bootdev CLI
The Bootdev CLI is the only way to submit your solution for this type of lesson. We need to be able to run commands in your environment to verify your solution.
You can install it here. It's a Go program hosted on GitHub, so you'll need Go installed as well. Instructions are on the GitHub page.