serve

command module
v0.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2026 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Serve

CI

[!WARNING] This is a toy project being built entirely from a smartphone using Claude Code, as an experiment to see how far AI-assisted development can go. Do not run it outside of a sandboxed environment.

What is it

Serve is a small HTTP file server written in Go. It lets you serve local files and directories over HTTP, with the ability to dynamically mount and unmount paths at runtime through a control API, no restart needed.

It runs two servers: a public one (default port 8080) that serves your files, and a control server (default port 8081) that accepts mount/unmount/list commands.

Getting started

Requires Go 1.24 or later.

go install github.com/tigerwill90/serve@latest

Usage

Start the server:

serve start

By default, the file server listens on 127.0.0.1:8080 and the control API on 127.0.0.1:8081. You can change this with flags:

serve start --host 0.0.0.0 --port 9090 --control-port 9091

Mount a local directory or file on a route:

serve mount ./public /static
serve mount ./config.json /config

List active mounts:

serve list

Unmount a route:

serve unmount /static

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL