Custom opinionated hand-made server
Find a file
2025-12-11 11:56:40 +00:00
src Add recorder and record, use in server 2025-12-11 11:56:40 +00:00
.gitignore Dump all code so far 2025-12-08 08:18:56 +00:00
build.zig Add recorder and record, use in server 2025-12-11 11:56:40 +00:00
build.zig.zon Dump all code so far 2025-12-08 08:18:56 +00:00
README.md Add build and run instructions to README 2025-12-08 08:29:46 +00:00

Infoserv

If I'm going to make a website, I'm going to write all of it. This starts by the server. I will be cheating by using libraries, including the Zig standard libraries, if it involves crypto (like TLS) or sockets/networking.

Infoserv is short for Information Server. It's just a cool retro-scifi name for the project.

Build and run

You only need Zig to build and run:

zig build -Doptimize=ReleaseFast

# Start HTTP server on port 9080
./zig-out/bin/infoserv http

# Start HTTPS server on port 9443 (see below for more instructions)
./zig-out/bin/infoserv https

Run an HTTPS server

No support for ACME methods and whatnot. For testing, just make your own key/certificate pair:

# Make the key (ed25519)
openssl ecparam -out private/ca-key.pem -name prime256v1 -genkey

# Make the certificate
openssl req -new -x509 -days 3650 -extensions v3_ca -key private/ca-key.pem -out certs/ca-cert.pem

Otherwise, store your certificate in certs with the name ca-cert.pem, and your key in private with the name ca-key.pem