Skip to content

Serve executor

The serve executor runs a Go application using go run.

nx serve my-go-app
Option Type Default Description
main string - Relative path from the project root to the main.go file defining the binary.
cmd go | tinygo | gow go The name of the binary to use
args string[] - Extra args when starting the app
env object - Environment variables to set when running the application

When main is set, the serve runs from the directory containing that main.go file. When omitted, the serve targets ./....

Inferred for projects containing a main package (applications). The target is continuous and not cached:

{
  "executor": "@naxodev/gonx:serve",
  "continuous": true,
  "options": {}
}