Building Cerve

March 18, 2025 2 min read
experience

Table Of Contents

  1. Inception
  2. Development

# Inception

I always wanted to learn low-level programming, using languages like C or C++. For my Computer Science & Engineering degree, I had to study the basics of C, C++ and Java. Although I learned low-level stuff a lot, it felt like I am not putting the learnings into somewhere. I decided to build a project in C. Build what? That was a hard question.

Whenever I wanted a simple HTTP server to try out simple websites, I had to use serve, a neat tool to serve static files, or python -m SimpleHTTPServer, a built-in module to create a simple web server.

And the idea hit me, why shouldn’t I implement a simple HTTP server to serve static files locally. This would be useful for myself as well.

# Development

I started developing Cerve. I wanted to use Neovim for tha sake of practice.

The development was going pretty slow. I had to go through a huge amount of tutorials.

I had to read through man pages of the C standard library. The documentation was thorough and easy to read through. The JavaScript frameworks can learn from these.

In about a week, Cerve hit a good enough position in terms of functionalities, I decided to publish it through GitHub Releases. As expected, I went through a lengthy trial and error process to set up the GitHub actions. The release binaries come around to be less than 18 KB. Good enough, it seems. Cerve works both on Linux and MacOS. I didn’t care enough to port it to Windows.

Overall the development was a good experience. Now, if I want to serve a static file, I can use Cerve instead of serve or SimpleHTTPServer.