CODESEEDSign in
Explore projects
Gobeginnerbackend

Static File Server with Go

Simple HTTP server in Go that serves static files with support for range requests, cache headers, and optional directory listing.

5 steps

Project steps

  1. 01

    Basic HTTP Server

    net/http FileServer with flag for root directory and port.

  2. 02

    Cache Headers

    Adds ETag and Last-Modified; responds with 304 to If-None-Match.

  3. 03

    Range Requests

    Support for Content-Range (video/audio seeking).

  4. 04

    Directory Listing Toggle

    Flag --no-dir-listing that returns 403 on directories.

  5. 05

    Access Log

    Structured log (JSON) with method, path, status, duration, bytes.

Recommended resources

Ready to build this?

Fork the repo on GitHub and start building. A mentor will review your code when you open a PR.

5 steps

Tech stack

Gonet/httpmime