Skip to content
This repository was archived by the owner on Apr 23, 2026. It is now read-only.

Latest commit

 

History

History
57 lines (48 loc) · 1.76 KB

File metadata and controls

57 lines (48 loc) · 1.76 KB

Terralux Backend

⚠️ Archived, now maintained here ⚠️

Powered by SunriseSunset.io

Installation

Using Cargo

If this is your first time working with Rust, set it up using rustup

# fetch the source
git clone https://github.com/solid-stack-solutions/terralux-backend
cd terralux-backend
# build and run
cargo run

Using Docker

# fetch source
git clone https://github.com/solid-stack-solutions/terralux-backend
cd terralux-backend
# build image
docker build -t terralux-backend:latest .
# prepare state file volume
touch state.json
# run image with state file volume
docker run -p 5000:5000 -v ./state.json:/root/.local/share/terralux-backend-state.json terralux-backend:latest
# option 1: fully automatic
nix run github:solid-stack-solutions/terralux-backend
# option 2: fetch source, build and run
git clone https://github.com/solid-stack-solutions/terralux-backend
cd terralux-backend
nix run

Development

# build and run while mocking connection to smart plug
cargo run -F mock_plug
# build and run with accelerated flow of time
cargo run -F demo_mode

### build and run with more logging
# in posix-compliant shells like bash you can do the following
# to set the environment variable RUST_LOG to a value like
# "terralux_backend=debug" just for executing one command (cargo run).
# on windows using cmd or powershell you might need different syntax.
RUST_LOG=terralux_backend=debug cargo run # more logging
RUST_LOG=terralux_backend=trace cargo run # too much logging