Skip to content

solid-stack-solutions/terralux-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terralux Backend

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

About

Terralux - Die smarte ALL IN ONE Lampensteuerung für dein Reptil.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •