This is the source for howsmyhttp.com.
How's My HTTP tells you which kind of HTTP your client supports. I built this in an effort to practice Go. Inspired by the eminently more useful howsmyssl.
TODO document /v1/api
HTML templates, CSS, and JavaScript live in src/
. sh/start.sh
watches src/
for changes and recompiles the project when the templates change.
All scripts live in sh/
.
build.sh |
Runs go build and generates the howsmyhttp binary |
start.sh |
Starts the server, watches src/ and recompiles when the templates change |
subset-fonts.sh |
Generates subset font files from src/fonts/ and outputs them to static/fonts/ |
gen-certs.sh |
Generates locally-trusted development certificates |
justrun
- Download a pre-built binary
- Build from source
go get github.com/jmhodges/justrun
mkcert
minify
go get github.com/tdewolff/minify/cmd/minify
howsmyhttp
uses Verdana, a web-safe font, for all body copy. Nunito is used for headings and decorative text. To reduce the size of font files, all loaded font files are subset to only include the glyphs in use on howsmyhttp.com
If you add text with glyphs not yet included in the subset font files, you'll need to regenerate them with glyphhanger
.
Install glyphanger with npm
:
npm i -g glyphhanger
glyphhanger
also requires pyftsubset
and brotli
for generating WOFF2 files. See the installation instructions if you don't already have these installed.
With the local server running, run sh/subset-fonts.sh
. The generated font files will be moved to static/fonts
. Copy the output @font-face
declarations into src/css/fonts.css
.