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.
Click to show internal directories.
Click to hide internal directories.