Clone the git repository.
git clone --recurse-submodules https://codeberg.org/SuperiorOne/nut_webgui.gitImportant
--recurse-submodules flag is required for the UPS validation tests. It pulls
NUT Device Dumps Library1 as a submodule, which contains known UPS
device dumps.
-
Start with bacon:
make watchcan start the development server. It simply callsbacon -j serve2.# (Optional) Set your NUT test server configs. export NUTWG__CONFIG_FILE="test.config.toml" export NUTWG__LOG_LEVEL="trace" export NUTWG__UPSD__ADDRESS="10.0.0.1" export NUTWG__UPSD__USERNAME="cid" export NUTWG__UPSD__PASSWORD="i_am_atomic" make watch
-
or use cargo:
cargo run -p nut_webgui
make test command runs all available tests.
A basic NUT server container image is available in the
tools/dummy_server directory in the source code.
It starts a NUT server, and automatically configures test devices.
Build container image:
cd ./tools/dummy_server
docker build -t dummy_server:latest -f dummy_server.DockerfileStart NUT server
docker run --rm -p 3493:3493 dummy_server:latest(Optional) Start with custom device dump files
docker run --rm -p 3493:3493 -v \
"$(pwd)/example-devices":/nut_devices dummy_server:latestThe dummy server is configured with a self-signed certificate.
The root certificate is available at tools/dummy_server/root.crt.