Skip to content

Live server

Because you don't want to reload your go server after each changes you've made.

AIR

Installation

  • with Go
# go 1.22 or higher
go install github.com/air-verse/air@latest

Usage

# firstly find `.air.toml` in current directory, if not found, use defaults
air -c .air.toml
# initialize the .air.toml configuration file to the current directory with the default settings
air init
## run air with
air

Note: You'll need to create an alias before being able to launch an air command.
For that you need to add a command to your bash configuration file (often .bashrc or .profile or .zhrc if you installed the Zsh shell, etc.)

echo "alias air='\$(go env GOPATH)/bin/air'" >> ~/.bashrc