Home

Awesome

zig-htmx-tailwind-example

zig version reference Zig htmx version build License: MIT

screenshot

Example CRUD app written in Zig + HTMX + Tailwind CSS

This project implements a pure dynamic web app with SPA-like features but without heavy complex Javascript or frameworks to keep up with. Just HTML/CSS + Zig ⚡

Usage

# Clone the repo
$ git clone https://github.com/dgv/zig-htmx-tailwind-example
$ cd zig-htmx-tailwind-example

# Run the server
$ zig build run

# Build the binary (default: ./zig-out/bin/zig-htmx-tailwind-example)
$ zig build

Environmental Variables

ADDR Binding Address (default: 127.0.0.1)
PORT Binding Port (default: 3000)

Dockerfile

I provide this just to easily deploy on a local server.

$ docker build -t zig-htmx-tailwind-example .
$ docker run -p 3000:3000 zig-htmx-tailwind-example

Tailwind

You can use tailwindcss cli to regenerate the css asset:

$ tailwindcss -i css/input.css -o css/output.css --minify