Help us shape the future of Go! Take the 2026 Go Developer Survey

inertia

command
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Command inertia is tug's example of an Inertia app: posts, shown by React pages that get their props from Go handlers, and written with forms that check themselves as they're filled in. The list's stats are a deferred prop, so the list shows before they're counted.

With the Vite dev server, which reloads the pages as they change:

npm install
npm run dev                          # writes public/hot while it runs
ADDR=127.0.0.1:8080 go run .         # in another terminal

With the frontend built into the binary:

npm run build && go build && ADDR=127.0.0.1:8080 ./inertia

Sessions are encrypted with APP_KEY; without one, the example makes up a key, and its sessions end when it stops.

Jump to

Keyboard shortcuts

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