m15o.net/site/lib/nex-pfm

NAME

nex-pfm - go request handler for nex

SYNOPSIS

import "hg.sr.ht/~m15o/nex-pfm"

func (h *Handler) Handle(p string, w io.Writer) error

nex-pfm provides a handler for serving static files in nex.

It supports these files at the root of a directory:

EXAMPLES

func main() {
	if len(os.Args) < 2 {
		log.Fatal("usage: nexd path")
	}

	h := nex.Handler{FS: os.DirFS(os.Args[1])}
	log.Fatal(listenAndServe(&h))
}

SOURCE

https://hg.sr.ht/~m15o/nex-pfm/

REF

nexd(bin)