Build
The build guide is intended for developers or advanced users only. Regular users should follow the quick start guide.
Prerequisites
- Make.
- Go version 1.27.2 or higher, as required by
go.mod. - Bun version 1.4.3, as pinned in
package.json. - Node.js version 21 or higher for the
npx browserslistcommand below.
You should execute the following command to update browser list database before build project.
shell
npx browserslist@latest --update-dbBuild Frontend
Please execute the following command in app directory.
shell
bun install
bun run buildBuild Backend
WARNING
Before building the backend, the app should be built first because the backend will embed the app distribution.
Please execute the following command in the project root directory.
shell
go generate
go build -tags=jsoniter -ldflags "$LD_FLAGS -X 'github.com/0xJacky/Nginx-UI/settings.buildTime=$(date +%s)'" -o nginx-ui -v main.go