Quick Start

Run With lazy

Use the lazy development loop for rebuilds, generated assets, and browser reloads.

By Guillermo Alvarez - Published - Updated

Start the app

Run lazy from the application module:

lazy

The command reads go.mod, selects ./cmd/<module-name> or ./cmd/app, builds a temporary development binary, starts it on an internal loopback address, and proxies the public address.

Choose the public address

Use ADDR or PORT when the default :3000 is not what you want:

ADDR=127.0.0.1:4000 lazy
PORT=4000 lazy

A numeric value is treated as a port. A full host:port value is used as the listen address.

Let lazy rebuild

When source files change, lazy rebuilds and restarts the app after a successful build. Apps with js.toml also run the JavaScript pipeline before the initial build and after relevant JavaScript changes:

app/js/app.js
app/js/controllers/hello_controller.js
js.toml
package.json
package-lock.json

Tailwind still runs through lazy tailwind, usually in a separate watch process during UI work:

lazy tailwind --watch

The lazy server watches the generated public CSS and reloads pages after the application rebuilds.

Build directly when needed

Production builds stay ordinary Go builds:

lazy js
lazy tailwind
go build -o .tmp/build/app ./cmd/app

Use Generated Assets Before Build for the build-time asset checklist.